summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/return-cycle.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/suggestions/return-cycle.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/return-cycle.rs b/src/test/ui/suggestions/return-cycle.rs
new file mode 100644
index 000000000..60b80e35a
--- /dev/null
+++ b/src/test/ui/suggestions/return-cycle.rs
@@ -0,0 +1,14 @@
+use std::marker::PhantomData;
+
+struct Token<T>(PhantomData<T>);
+
+impl<T> Token<T> {
+ fn new() -> _ {
+ //~^ 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::<()>)
+ }
+}
+
+fn main() {}