]> git.lizzy.rs Git - rust.git/blob - tests/ui/confuse-field-and-method/issue-18343.stderr
Rollup merge of #107201 - compiler-errors:confusing-async-fn-note, r=estebank
[rust.git] / tests / ui / confuse-field-and-method / issue-18343.stderr
1 error[E0599]: no method named `closure` found for struct `Obj` in the current scope
2   --> $DIR/issue-18343.rs:7:7
3    |
4 LL | struct Obj<F> where F: FnMut() -> u32 {
5    | ------------- method `closure` not found for this struct
6 ...
7 LL |     o.closure();
8    |       ^^^^^^^ field, not a method
9    |
10 help: to call the function stored in `closure`, surround the field access with parentheses
11    |
12 LL |     (o.closure)();
13    |     +         +
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0599`.