]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/return-cycle.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / suggestions / return-cycle.rs
1 use std::marker::PhantomData;
2
3 struct Token<T>(PhantomData<T>);
4
5 impl<T> Token<T> {
6     fn new() -> _ {
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::<()>)
11     }
12 }
13
14 fn main() {}