diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-2380.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-2380.rs b/src/test/ui/issues/auxiliary/issue-2380.rs new file mode 100644 index 000000000..9a51a73c9 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-2380.rs @@ -0,0 +1,15 @@ +#![crate_name="a"] +#![crate_type = "lib"] + +#![feature(box_syntax)] + +pub trait i<T> +{ + fn dummy(&self, t: T) -> T { panic!() } +} + +pub fn f<T>() -> Box<i<T>+'static> { + impl<T> i<T> for () { } + + box () as Box<i<T>+'static> +} |