diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/suggestions/return-cycle-2.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/return-cycle-2.rs b/src/test/ui/suggestions/return-cycle-2.rs new file mode 100644 index 000000000..d6d24be1b --- /dev/null +++ b/src/test/ui/suggestions/return-cycle-2.rs @@ -0,0 +1,14 @@ +use std::marker::PhantomData; + +struct Token<T>(PhantomData<T>); + +impl<T> Token<T> { + fn as_ref(_: i32, _: i32) -> _ { + //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types + //~| NOTE not allowed in type signatures + //~| HELP replace with the correct return type + Token(PhantomData::<&T>) + } +} + +fn main() {} |