2022-02-13 13:06:06 -07:00
|
|
|
// 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
|
2022-04-26 17:04:44 -04:00
|
|
|
// The error "note: this is a function, perhaps you wish to call it" MUST NOT appear.
|
2022-02-13 13:06:06 -07:00
|
|
|
arc.blablabla();
|
|
|
|
//~^ ERROR no method named `blablabla`
|
|
|
|
//~| NOTE method not found
|
|
|
|
let arc2 = std::sync::Arc::new(|| 1);
|
2022-04-26 17:04:44 -04:00
|
|
|
// The error "note: this is a function, perhaps you wish to call it" SHOULD appear
|
2022-02-13 13:06:06 -07:00
|
|
|
arc2.blablabla();
|
|
|
|
//~^ ERROR no method named `blablabla`
|
|
|
|
//~| NOTE method not found
|
2022-04-26 17:04:44 -04:00
|
|
|
//~| NOTE this is a function, perhaps you wish to call it
|
2022-02-13 13:06:06 -07:00
|
|
|
}
|