diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-2311-2.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-2311-2.rs b/src/test/ui/issues/issue-2311-2.rs new file mode 100644 index 000000000..760d4edaa --- /dev/null +++ b/src/test/ui/issues/issue-2311-2.rs @@ -0,0 +1,26 @@ +// check-pass +#![allow(dead_code)] +#![allow(non_camel_case_types)] + + +trait clam<A> { + fn get(self) -> A; +} + +struct foo<A> { + x: A, +} + +impl<A> foo<A> { + pub fn bar<B,C:clam<A>>(&self, _c: C) -> B { + panic!(); + } +} + +fn foo<A>(b: A) -> foo<A> { + foo { + x: b + } +} + +pub fn main() { } |