blob: 3d2bcb8ad3550922d568c46c90673cf16ef72f8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// This test case checks the behavior of typeck::check::method::suggest::is_fn on Ty::Error.
fn main() {
let arc = std::sync::Arc::new(oops);
//~^ ERROR cannot find value `oops` in this scope
//~| NOTE not found
// The error "note: this is a function, perhaps you wish to call it" MUST NOT appear.
arc.blablabla();
//~^ ERROR no method named `blablabla`
//~| NOTE method not found
let arc2 = std::sync::Arc::new(|| 1);
// The error "note: this is a function, perhaps you wish to call it" SHOULD appear
arc2.blablabla();
//~^ ERROR no method named `blablabla`
//~| NOTE method not found
//~| NOTE this is a function, perhaps you wish to call it
}
|