From 05ffdc58248f7d5f2626a31d7272ad608d3984ec Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 28 Jan 2015 05:59:50 -0500 Subject: [PATCH] Add regression test for #21212. Fixes #21212. --- .../run-pass/associated-types-issue-21212.rs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/test/run-pass/associated-types-issue-21212.rs diff --git a/src/test/run-pass/associated-types-issue-21212.rs b/src/test/run-pass/associated-types-issue-21212.rs new file mode 100644 index 000000000000..ced44250e4d3 --- /dev/null +++ b/src/test/run-pass/associated-types-issue-21212.rs @@ -0,0 +1,28 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// 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: ::Input) { + panic!() + } +} +impl

Parser for P { + type Input = (); +} + +fn main() { +}