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