-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveT-middleType: Probably requires verifiying typesType: Probably requires verifiying types
Description
After rust-lang/rust#69189, the following check returns true
for types, where only the lifetimes differ: &'a T == &'b T
rust-clippy/clippy_lints/src/transmute.rs
Lines 303 to 307 in c036c4f
let from_ty = cx.tables.expr_ty(&args[0]); | |
let to_ty = cx.tables.expr_ty(e); | |
match (&from_ty.kind, &to_ty.kind) { | |
_ if from_ty == to_ty => span_lint( |
According to rust-lang/rust#69189 (comment), this probably needs to be fixed by checking the lifetimes of the types with MIR borrowck
.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.I-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveT-middleType: Probably requires verifiying typesType: Probably requires verifiying types