summary refs log tree commit diff stats
path: root/tests/ui/example_opaque_vs_drop.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/example_opaque_vs_drop.stderr')
-rw-r--r--tests/ui/example_opaque_vs_drop.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/example_opaque_vs_drop.stderr b/tests/ui/example_opaque_vs_drop.stderr
new file mode 100644
index 0000000..1749031
--- /dev/null
+++ b/tests/ui/example_opaque_vs_drop.stderr
@@ -0,0 +1,15 @@
+error[E0597]: `x` does not live long enough
+  --> tests/ui/example_opaque_vs_drop.rs:18:1
+   |
+18 | / opaque! {
+19 | |     impl Opaque for FooKey {
+20 | |         type Kind<'a> = Foo<'a>;
+21 | |     }
+22 | | }
+   | | ^
+   | | |
+   | | borrowed value does not live long enough
+   | |_`x` dropped here while still borrowed
+   |   borrow might be used here, when `x` is dropped and runs the destructor for type `UBCheck<Foo<'_>>`
+   |
+   = note: this error originates in the macro `opaque` (in Nightly builds, run with -Z macro-backtrace for more info)