summaryrefslogtreecommitdiffstats
path: root/src/test/ui/keyword/keyword-self-as-type-param.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/keyword/keyword-self-as-type-param.rs')
-rw-r--r--src/test/ui/keyword/keyword-self-as-type-param.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/keyword/keyword-self-as-type-param.rs b/src/test/ui/keyword/keyword-self-as-type-param.rs
new file mode 100644
index 000000000..55c7ac128
--- /dev/null
+++ b/src/test/ui/keyword/keyword-self-as-type-param.rs
@@ -0,0 +1,10 @@
+// Regression test of #36638.
+
+struct Foo<Self>(Self);
+//~^ ERROR unexpected keyword `Self` in generic parameters
+//~| ERROR recursive type `Foo` has infinite size
+
+trait Bar<Self> {}
+//~^ ERROR unexpected keyword `Self` in generic parameters
+
+fn main() {}