Skip to content

Commit

Permalink
Auto merge of rust-lang#115025 - ouz-a:ouz_testing, r=lcnr
Browse files Browse the repository at this point in the history
Make subtyping explicit in MIR

This adds new mir-opt that pushes new `ProjectionElem` called `ProjectionElem::Subtype(T)` to `Rvalue` of a subtyped assignment so we can unsoundness issues like rust-lang#107205

Addresses rust-lang#112651

r? `@lcnr`
  • Loading branch information
bors committed Oct 3, 2023
2 parents 3169423 + ea4b388 commit f107a50
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clippy_utils/src/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ fn check_place<'tcx>(tcx: TyCtxt<'tcx>, place: Place<'tcx>, span: Span, body: &B
| ProjectionElem::Downcast(..)
| ProjectionElem::Subslice { .. }
| ProjectionElem::Deref
| ProjectionElem::Subtype(_)
| ProjectionElem::Index(_) => {},
}
}
Expand Down

0 comments on commit f107a50

Please sign in to comment.