]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/return-cycle-2.rs
Account for method call and indexing when looking for inner-most path in expression
[rust.git] / tests / ui / suggestions / return-cycle-2.rs
1 use std::marker::PhantomData;
2
3 struct Token<T>(PhantomData<T>);
4
5 impl<T> Token<T> {
6     fn as_ref(_: i32, _: i32) -> _ {
7         //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
8         //~| NOTE not allowed in type signatures
9         //~| HELP replace with the correct return type
10         Token(PhantomData::<&T>)
11     }
12 }
13
14 fn main() {}