summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/associated-types-issue-21212.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/associated-types-issue-21212.rs')
-rw-r--r--src/test/ui/associated-types/associated-types-issue-21212.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/associated-types-issue-21212.rs b/src/test/ui/associated-types/associated-types-issue-21212.rs
new file mode 100644
index 000000000..ce27eac4d
--- /dev/null
+++ b/src/test/ui/associated-types/associated-types-issue-21212.rs
@@ -0,0 +1,22 @@
+// run-pass
+#![allow(unused_variables)]
+// Regression test for #21212: an overflow occurred during trait
+// checking where normalizing `Self::Input` led to normalizing the
+// where clauses in the environment which in turn required normalizing
+// `Self::Input`.
+
+
+pub trait Parser {
+ type Input;
+
+ fn parse(input: <Self as Parser>::Input) {
+ panic!()
+ }
+}
+
+impl <P> Parser for P {
+ type Input = ();
+}
+
+fn main() {
+}