]> git.lizzy.rs Git - rust.git/blob - tests/ui/confuse-field-and-method/issue-32128.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / confuse-field-and-method / issue-32128.rs
1 struct Example {
2     example: Box<dyn Fn(i32) -> i32>
3 }
4
5 fn main() {
6     let demo = Example {
7         example: Box::new(|x| {
8             x + 1
9         })
10     };
11
12     demo.example(1);
13     //~^ ERROR no method named `example`
14     // (demo.example)(1);
15 }