summaryrefslogtreecommitdiffstats
path: root/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs')
-rw-r--r--src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs
new file mode 100644
index 000000000..09e5bbd84
--- /dev/null
+++ b/src/test/ui/underscore-lifetime/where-clause-trait-impl-region.rs
@@ -0,0 +1,15 @@
+// revisions: rust2015 rust2018
+//[rust2018] edition:2018
+
+trait WithType<T> {}
+trait WithRegion<'a> { }
+
+trait Foo { }
+
+impl<T> Foo for Vec<T>
+where
+ T: WithType<&u32>
+//[rust2015,rust2018]~^ ERROR `&` without an explicit lifetime name cannot be used here
+{ }
+
+fn main() {}