diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-12-04 16:43:07 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-12-04 16:43:07 -0300 |
commit | 72519f2161672a2edcd393a41f9f2cd01eddc22f (patch) | |
tree | e23cf5aae200616435d17970366834126f6e34cc /tests/ui/example_opaque_vs_drop.stderr | |
parent | ba97c812bd97c9a086aea5b3ce89c87e4b0222ec (diff) |
Use a wrapper struct to enable closures
Diffstat (limited to 'tests/ui/example_opaque_vs_drop.stderr')
-rw-r--r-- | tests/ui/example_opaque_vs_drop.stderr | 15 |
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) |