-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
borrowck unsoundness #13497
Comments
(specifically the only valid lifetime should be |
A longer example, which this is extracted from, exhibits memory unsafety: https://gist.github.com/anonymous/10601934 |
This is likely a dupe of #12223, but I'm not familiar enough with the code to say for certain. |
They do appear similar. |
I agree with @alexcrichton I think this is a dupe of #13497 mind if I copy this example in that bug and close this one? The other bug has already been triaged and prioritized. |
I'm not convinced this is actually a dupe, the other seems to have to do On Mon, Apr 14, 2014 at 5:00 PM, Flavio Percoco Premoli <
|
I'll try to investigate today. |
The current-rust translations of this seems to be correctly rejected: With:
I get:
And with:
I get:
|
Thanks @jfager! Flagging as needstest. |
…rednet unused_result_ok: added in Clippy 1.82.0, not 1.70.0 changelog: none Fix rust-lang#13497
read_lines_borrowed is not rejected. but the value it returns cannot possibly be valid, since rawLines is going to be free'd after it returns, leaving the collected references dangling.
The text was updated successfully, but these errors were encountered: