]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/functions-closures/fn-help-with-err.rs
1 // This test case checks the behavior of typeck::check::method::suggest::is_fn on Ty::Error.
3 let arc
= std
::sync
::Arc
::new(oops
);
4 //~^ ERROR cannot find value `oops` in this scope
6 // The error "note: this is a function, perhaps you wish to call it" MUST NOT appear.
8 //~^ ERROR no method named `blablabla`
9 //~| NOTE method not found
10 let arc2
= std
::sync
::Arc
::new(|| 1);
11 // The error "note: this is a function, perhaps you wish to call it" SHOULD appear
13 //~^ ERROR no method named `blablabla`
14 //~| NOTE method not found
15 //~| NOTE this is a function, perhaps you wish to call it