]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/return-cycle.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / 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() {}