-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
unused_lifetimes yeets unsafe binders #141758
Copy link
Copy link
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.F-unsafe_binders`#![feature(unsafe_binders)]``#![feature(unsafe_binders)]`L-unused_lifetimesLint: unused_lifetimesLint: unused_lifetimesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.F-unsafe_binders`#![feature(unsafe_binders)]``#![feature(unsafe_binders)]`L-unused_lifetimesLint: unused_lifetimesLint: unused_lifetimesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Probably the most amusing bug I will encounter today :)
I tried this code:
I expected to see this happen: explanation
Instead, this happened: explanation
Meta
rustc --version --verbose:cargo check:
cargo fix
it removes the entire
unsafe<'a> S😆