You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2021. It is now read-only.
error: free region `'slice` does not outlive free region `'buffer`
--> src/main.rs:5:1
|
5 | / rental! {
6 | | mod rent_test {
7 | | #[rental]
8 | | pub struct OwnedSlice {
... |
12 | | }
13 | | }
| |_^
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
Not sure why the compiler thinks slice should outlive buffer, and if anything can be done about that, but maybe the crate could fail the build with an error message if it detects non lexical lifetimes are enabled.
The text was updated successfully, but these errors were encountered:
That's weird; I'll look into it. I didn't think NLL would affect rental. Hopefully it's easy to fix, but if not then I'll at least add a test case so any crater runs for NLL fail with a regression since I don't think working code is supposed to stop working under NLL.
Update: After isolating and minifying, this is definitely a compiler bug. It seems there's an open issue for it already, since it appears to also break serde derive in some cases. I'll leave this issue open for now until a fix lands.
Code:
Error:
Backtrace:
Not sure why the compiler thinks
slice
should outlivebuffer
, and if anything can be done about that, but maybe the crate could fail the build with an error message if it detects non lexical lifetimes are enabled.The text was updated successfully, but these errors were encountered: