]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-assoc-fn-call-deref.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / ui / suggestions / suggest-assoc-fn-call-deref.rs
1 // run-rustfix
2
3 #![allow(unused)]
4
5 struct Foo<T>(T);
6
7 impl<T> Foo<T> {
8     fn test() -> i32 { 1 }
9 }
10
11 fn main() {
12     let x = Box::new(Foo(1i32));
13     x.test();
14     //~^ ERROR no method named `test` found for struct `Box<Foo<i32>>` in the current scope
15 }