]> git.lizzy.rs Git - rust.git/blob - src/test/ui/functions-closures/fn-help-with-err.rs
Auto merge of #98203 - kckeiks:gather-body-owners-in-hir-item-queries, r=cjgillot
[rust.git] / 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.
2 fn main() {
3     let arc = std::sync::Arc::new(oops);
4     //~^ ERROR cannot find value `oops` in this scope
5     //~| NOTE not found
6     // The error "note: this is a function, perhaps you wish to call it" MUST NOT appear.
7     arc.blablabla();
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
12     arc2.blablabla();
13     //~^ ERROR no method named `blablabla`
14     //~| NOTE method not found
15     //~| NOTE this is a function, perhaps you wish to call it
16 }