summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/explicit-union.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs b/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs
new file mode 100644
index 000000000..871208b5b
--- /dev/null
+++ b/src/test/ui/rfc-2093-infer-outlives/explicit-union.rs
@@ -0,0 +1,14 @@
+#![feature(rustc_attrs)]
+
+#[rustc_outlives]
+union Foo<'b, U: Copy> { //~ ERROR rustc_outlives
+ bar: Bar<'b, U>
+}
+
+#[derive(Clone, Copy)]
+union Bar<'a, T: Copy> where T: 'a {
+ x: &'a (),
+ y: T,
+}
+
+fn main() {}