fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
534 B17 linesraw
1error[E0599]: no method named `example` found for type `Example` in the current scope
2  --> $DIR/issue-32128.rs:12:10
3   |
4LL | struct Example {
5   | -------------- method `example` not found for this
6...
7LL |     demo.example(1);
8   |          ^^^^^^^ field, not a method
9   |
10help: to call the function stored in `example`, surround the field access with parentheses
11   |
12LL |     (demo.example)(1);
13   |     ^            ^
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0599`.