summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs')
-rw-r--r--src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs b/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs
new file mode 100644
index 000000000..cc29f9de7
--- /dev/null
+++ b/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs
@@ -0,0 +1,16 @@
+#[derive(Eq, PartialEq)]
+struct Test {
+ a: &'b str,
+ //~^ ERROR use of undeclared lifetime name `'b`
+ //~| ERROR use of undeclared lifetime name `'b`
+}
+
+trait T {
+ fn foo(&'static self) {}
+}
+
+impl T for Test {
+ fn foo(&'b self) {} //~ ERROR use of undeclared lifetime name `'b`
+}
+
+fn main() {}