rust/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
264 B
Rust
Raw Normal View History

// run-rustfix
#![allow(unused)]
struct Foo<T>(T);
impl<T> Foo<T> {
fn test() -> i32 { 1 }
}
fn main() {
let x = Box::new(Foo(1i32));
Foo::<i32>::test();
//~^ ERROR no method named `test` found for struct `Box<Foo<i32>>` in the current scope
}