-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect loan error when local borrowed variable is updated to new loan #5550
Comments
This works now; I'll check in the test case. |
ghost
assigned catamorphism
May 24, 2013
catamorphism
added a commit
to catamorphism/rust
that referenced
this issue
May 28, 2013
Test case checked in in 9a06ff0. Closing |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
May 5, 2020
Implement the manual_non_exhaustive lint Some implementation notes: * Not providing automatic fixups because additional changes may be needed in other parts of the code, e.g. when constructing a struct. * Even though the attribute is valid on enum variants, it's not possible to use the manual implementation of the pattern because the visibility is always public, so the lint ignores enum variants. * Unit structs are also ignored, it's not possible to implement the pattern manually without fields. * The attribute is not accepted in unions, so those are ignored too. * Even though the original issue did not mention it, tuple structs are also linted because it's possible to apply the pattern manually. changelog: Added the manual non-exhaustive implementation lint Closes rust-lang#2017
This was referenced Sep 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code...
...results in the following error:
Both
t
andt.slice(0, 3)
are loans ofs
, so it should be safe to updatet
to new loan ofs
as updatingt
doesn't causes
to be freed.The text was updated successfully, but these errors were encountered: