]> git.lizzy.rs Git - rust.git/blob - tests/ui/confuse-field-and-method/issue-32128.stderr
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / confuse-field-and-method / issue-32128.stderr
1 error[E0599]: no method named `example` found for struct `Example` in the current scope
2   --> $DIR/issue-32128.rs:12:10
3    |
4 LL | struct Example {
5    | -------------- method `example` not found for this struct
6 ...
7 LL |     demo.example(1);
8    |          ^^^^^^^ field, not a method
9    |
10 help: to call the function stored in `example`, surround the field access with parentheses
11    |
12 LL |     (demo.example)(1);
13    |     +            +
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0599`.