OpaqueCast projections are always overlapping, they can't possibly be disjoint
This commit is contained in:
parent
008bc1d587
commit
46b37e20af
1 changed files with 4 additions and 10 deletions
|
@ -320,16 +320,10 @@ fn place_projection_conflict<'tcx>(
|
||||||
debug!("place_element_conflict: DISJOINT-OR-EQ-DEREF");
|
debug!("place_element_conflict: DISJOINT-OR-EQ-DEREF");
|
||||||
Overlap::EqualOrDisjoint
|
Overlap::EqualOrDisjoint
|
||||||
}
|
}
|
||||||
(ProjectionElem::OpaqueCast(v1), ProjectionElem::OpaqueCast(v2)) => {
|
(ProjectionElem::OpaqueCast(_), ProjectionElem::OpaqueCast(_)) => {
|
||||||
if v1 == v2 {
|
// casts to other types may always conflict irrespective of the type being cast to.
|
||||||
// same type - recur.
|
debug!("place_element_conflict: DISJOINT-OR-EQ-OPAQUE");
|
||||||
debug!("place_element_conflict: DISJOINT-OR-EQ-OPAQUE");
|
Overlap::EqualOrDisjoint
|
||||||
Overlap::EqualOrDisjoint
|
|
||||||
} else {
|
|
||||||
// Different types. Disjoint!
|
|
||||||
debug!("place_element_conflict: DISJOINT-OPAQUE");
|
|
||||||
Overlap::Disjoint
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
(ProjectionElem::Field(f1, _), ProjectionElem::Field(f2, _)) => {
|
(ProjectionElem::Field(f1, _), ProjectionElem::Field(f2, _)) => {
|
||||||
if f1 == f2 {
|
if f1 == f2 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue