]> git.proxmox.com Git - rustc.git/blame - src/test/ui/confuse-field-and-method/issue-32128.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / confuse-field-and-method / issue-32128.rs
CommitLineData
54a0048b 1struct Example {
dc9dc135 2 example: Box<dyn Fn(i32) -> i32>
223e47cc
LB
3}
4
5fn main() {
54a0048b
SL
6 let demo = Example {
7 example: Box::new(|x| {
8 x + 1
9 })
10 };
11
cc61c64b
XL
12 demo.example(1);
13 //~^ ERROR no method named `example`
54a0048b 14 // (demo.example)(1);
223e47cc 15}