summaryrefslogtreecommitdiffstats
path: root/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs')
-rw-r--r--src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs
new file mode 100644
index 000000000..567cc7a3f
--- /dev/null
+++ b/src/test/ui/underscore-lifetime/underscore-outlives-bounds.rs
@@ -0,0 +1,8 @@
+// Regression test to check that `'b: '_` gets an error, because it's
+// basically useless.
+//
+// #54902
+
+trait Foo<'a> {}
+impl<'b: '_> Foo<'b> for i32 {} //~ ERROR `'_` cannot be used here
+fn main() { }