We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Warn when the code tries to copy the value behind a reference, then borrow the copy.
No response
fn main() { let a = &[0u8; 2]; let r = &mut { *a }; }
Similar to https://users.rust-lang.org/t/runtime-speed-when-converting-as-bytes-or-as-ref-to-be-mut/123712/10 that tries to convert a reference to mutably borrow.
The text was updated successfully, but these errors were encountered:
copy_then_borrow_mut
samueltardieu
Successfully merging a pull request may close this issue.
What it does
Warn when the code tries to copy the value behind a reference, then borrow the copy.
Advantage
No response
Drawbacks
No response
Example
Similar to https://users.rust-lang.org/t/runtime-speed-when-converting-as-bytes-or-as-ref-to-be-mut/123712/10 that tries to convert a reference to mutably borrow.
The text was updated successfully, but these errors were encountered: