diff options
Diffstat (limited to 'tests/ui/associated-types/associated-types-issue-21212.rs')
-rw-r--r-- | tests/ui/associated-types/associated-types-issue-21212.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/associated-types/associated-types-issue-21212.rs b/tests/ui/associated-types/associated-types-issue-21212.rs new file mode 100644 index 000000000..ce27eac4d --- /dev/null +++ b/tests/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() { +} |