Skip to main content

rustc_borrowck/
places_conflict.rs

1//! The borrowck rules for proving disjointness are applied from the "root" of the
2//! borrow forwards, iterating over "similar" projections in lockstep until
3//! we can prove overlap one way or another. Essentially, we treat `Overlap` as
4//! a monoid and report a conflict if the product ends up not being `Disjoint`.
5//!
6//! On each step, if we didn't run out of borrow or place, we know that our elements
7//! have the same type, and that they only overlap if they are the identical.
8//!
9//! For example, if we are comparing these:
10//! ```text
11//! BORROW:  (*x1[2].y).z.a
12//! ACCESS:  (*x1[i].y).w.b
13//! ```
14//!
15//! Then our steps are:
16//! ```text
17//!       x1         |   x1          -- places are the same
18//!       x1[2]      |   x1[i]       -- equal or disjoint (disjoint if indexes differ)
19//!       x1[2].y    |   x1[i].y     -- equal or disjoint
20//!      *x1[2].y    |  *x1[i].y     -- equal or disjoint
21//!     (*x1[2].y).z | (*x1[i].y).w  -- we are disjoint and don't need to check more!
22//! ```
23//!
24//! Because `zip` does potentially bad things to the iterator inside, this loop
25//! also handles the case where the access might be a *prefix* of the borrow, e.g.
26//!
27//! ```text
28//! BORROW:  (*x1[2].y).z.a
29//! ACCESS:  x1[i].y
30//! ```
31//!
32//! Then our steps are:
33//! ```text
34//!       x1         |   x1          -- places are the same
35//!       x1[2]      |   x1[i]       -- equal or disjoint (disjoint if indexes differ)
36//!       x1[2].y    |   x1[i].y     -- equal or disjoint
37//! ```
38//!
39//! -- here we run out of access - the borrow can access a part of it. If this
40//! is a full deep access, then we *know* the borrow conflicts with it. However,
41//! if the access is shallow, then we can proceed:
42//!
43//! ```text
44//!       x1[2].y    | (*x1[i].y)    -- a deref! the access can't get past this, so we
45//!                                     are disjoint
46//! ```
47//!
48//! Our invariant is, that at each step of the iteration:
49//!  - If we didn't run out of access to match, our borrow and access are comparable
50//!    and either equal or disjoint.
51//!  - If we did run out of access, the borrow can access a part of it.
52
53use std::cmp::max;
54use std::iter;
55
56use rustc_hir as hir;
57use rustc_middle::mir::{
58    Body, BorrowKind, FakeBorrowKind, MutBorrowKind, Place, PlaceElem, PlaceRef, ProjectionElem,
59};
60use rustc_middle::ty::{self, TyCtxt};
61use rustc_span::bug;
62use tracing::{debug, instrument};
63
64use crate::{AccessDepth, ArtificialField, Deep, Overlap, Shallow};
65
66/// When checking if a place conflicts with another place, this enum is used to influence decisions
67/// where a place might be equal or disjoint with another place, such as if `a[i] == a[j]`.
68/// `PlaceConflictBias::Overlap` would bias toward assuming that `i` might equal `j` and that these
69/// places overlap. `PlaceConflictBias::NoOverlap` assumes that for the purposes of the predicate
70/// being run in the calling context, the conservative choice is to assume the compared indices
71/// are disjoint (and therefore, do not overlap).
72#[derive(#[automatically_derived]impl ::core::marker::Copy for PlaceConflictBias { }Copy, #[automatically_derived]#[doc(hidden)]unsafe impl ::core::clone::TrivialClone
    for PlaceConflictBias {
}
#[automatically_derived]impl ::core::clone::Clone for PlaceConflictBias {
    #[inline]
    fn clone(&self) -> Self { *self }
}Clone, #[automatically_derived]impl ::core::fmt::Debug for PlaceConflictBias {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                PlaceConflictBias::Overlap => "Overlap",
                PlaceConflictBias::NoOverlap => "NoOverlap",
            })
    }
}Debug, #[automatically_derived]impl ::core::cmp::Eq for PlaceConflictBias { }Eq, #[automatically_derived]impl ::core::marker::StructuralPartialEq for
    PlaceConflictBias {
}
#[automatically_derived]impl ::core::cmp::PartialEq for PlaceConflictBias {
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        ::core::intrinsics::discriminant_value(self) ==
            ::core::intrinsics::discriminant_value(other)
    }
}PartialEq)]
73pub enum PlaceConflictBias {
74    Overlap,
75    NoOverlap,
76}
77
78/// Helper function for checking if places conflict with a mutable borrow and deep access depth.
79/// This is used to check for places conflicting outside of the borrow checking code (such as in
80/// dataflow).
81pub fn places_conflict<'tcx>(
82    tcx: TyCtxt<'tcx>,
83    body: &Body<'tcx>,
84    borrow_place: Place<'tcx>,
85    access_place: Place<'tcx>,
86    bias: PlaceConflictBias,
87) -> bool {
88    borrow_conflicts_with_place(
89        tcx,
90        body,
91        borrow_place,
92        BorrowKind::Mut { kind: MutBorrowKind::TwoPhaseBorrow },
93        access_place.as_ref(),
94        AccessDepth::Deep,
95        bias,
96    )
97}
98
99/// Checks whether the `borrow_place` conflicts with the `access_place` given a borrow kind and
100/// access depth. The `bias` parameter is used to determine how the unknowable (comparing runtime
101/// array indices, for example) should be interpreted - this depends on what the caller wants in
102/// order to make the conservative choice and preserve soundness.
103#[inline]
104pub(super) fn borrow_conflicts_with_place<'tcx>(
105    tcx: TyCtxt<'tcx>,
106    body: &Body<'tcx>,
107    borrow_place: Place<'tcx>,
108    borrow_kind: BorrowKind,
109    access_place: PlaceRef<'tcx>,
110    access: AccessDepth,
111    bias: PlaceConflictBias,
112) -> bool {
113    let borrow_local = borrow_place.local;
114    let access_local = access_place.local;
115
116    if borrow_local != access_local {
117        // We have proven the borrow disjoint - further projections will remain disjoint.
118        return false;
119    }
120
121    // This Local/Local case is handled by the more general code below, but
122    // it's so common that it's a speed win to check for it first.
123    if borrow_place.projection.is_empty() && access_place.projection.is_empty() {
124        return true;
125    }
126
127    place_components_conflict(tcx, body, borrow_place, borrow_kind, access_place, access, bias)
128}
129
130{}
#[allow(clippy :: suspicious_else_formatting)]
{
    let __tracing_attr_span;
    let __tracing_attr_guard;
    if ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() ||
            { false } {
        __tracing_attr_span =
            {
                use ::tracing::__macro_support::Callsite as _;
                static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                    {
                        static META: ::tracing::Metadata<'static> =
                            {
                                ::tracing_core::metadata::Metadata::new("place_components_conflict",
                                    "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                    ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                    ::tracing_core::__macro_support::Option::Some(130u32),
                                    ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                    ::tracing_core::field::FieldSet::new(&[{
                                                        const NAME:
                                                            ::tracing::__macro_support::FieldName<{
                                                                ::tracing::__macro_support::FieldName::len("borrow_place")
                                                            }> =
                                                            ::tracing::__macro_support::FieldName::new("borrow_place");
                                                        NAME.as_str()
                                                    },
                                                    {
                                                        const NAME:
                                                            ::tracing::__macro_support::FieldName<{
                                                                ::tracing::__macro_support::FieldName::len("borrow_kind")
                                                            }> =
                                                            ::tracing::__macro_support::FieldName::new("borrow_kind");
                                                        NAME.as_str()
                                                    },
                                                    {
                                                        const NAME:
                                                            ::tracing::__macro_support::FieldName<{
                                                                ::tracing::__macro_support::FieldName::len("access_place")
                                                            }> =
                                                            ::tracing::__macro_support::FieldName::new("access_place");
                                                        NAME.as_str()
                                                    },
                                                    {
                                                        const NAME:
                                                            ::tracing::__macro_support::FieldName<{
                                                                ::tracing::__macro_support::FieldName::len("access")
                                                            }> =
                                                            ::tracing::__macro_support::FieldName::new("access");
                                                        NAME.as_str()
                                                    },
                                                    {
                                                        const NAME:
                                                            ::tracing::__macro_support::FieldName<{
                                                                ::tracing::__macro_support::FieldName::len("bias")
                                                            }> =
                                                            ::tracing::__macro_support::FieldName::new("bias");
                                                        NAME.as_str()
                                                    }], ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                    ::tracing::metadata::Kind::SPAN)
                            };
                        ::tracing::callsite::DefaultCallsite::new(&META)
                    };
                let mut interest = ::tracing::subscriber::Interest::never();
                if ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::LevelFilter::current() &&
                            { interest = __CALLSITE.interest(); !interest.is_never() }
                        &&
                        ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                            interest) {
                    let meta = __CALLSITE.metadata();
                    ::tracing::Span::new(meta,
                        &{
                                #[allow(unused_imports)]
                                use ::tracing::field::{debug, display, Value};
                                meta.fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&::tracing::field::debug(&borrow_place)
                                                            as &dyn ::tracing::field::Value)),
                                                (::tracing::__macro_support::Option::Some(&::tracing::field::debug(&borrow_kind)
                                                            as &dyn ::tracing::field::Value)),
                                                (::tracing::__macro_support::Option::Some(&::tracing::field::debug(&access_place)
                                                            as &dyn ::tracing::field::Value)),
                                                (::tracing::__macro_support::Option::Some(&::tracing::field::debug(&access)
                                                            as &dyn ::tracing::field::Value)),
                                                (::tracing::__macro_support::Option::Some(&::tracing::field::debug(&bias)
                                                            as &dyn ::tracing::field::Value))])
                            })
                } else {
                    let span =
                        ::tracing::__macro_support::__disabled_span(__CALLSITE.metadata());
                    {};
                    span
                }
            };
        __tracing_attr_guard = __tracing_attr_span.enter();
    }

    #[warn(clippy :: suspicious_else_formatting)]
    {

        #[allow(unknown_lints, unreachable_code, clippy ::
        diverging_sub_expression, clippy :: empty_loop, clippy ::
        let_unit_value, clippy :: let_with_type_underscore, clippy ::
        needless_return, clippy :: unreachable)]
        if false {
            let __tracing_attr_fake_return: bool = loop {};
            return __tracing_attr_fake_return;
        }
        {
            let borrow_local = borrow_place.local;
            let access_local = access_place.local;
            {
                match (&borrow_local, &access_local) {
                    (left_val, right_val) => {
                        if !(*left_val == *right_val) {
                            let kind = ::core::panicking::AssertKind::Eq;
                            ::core::panicking::assert_failed(kind, &*left_val,
                                &*right_val, ::core::option::Option::None);
                        }
                    }
                }
            };
            for ((borrow_place, borrow_c), &access_c) in
                iter::zip(borrow_place.iter_projections(),
                    access_place.projection) {
                {
                    use ::tracing::__macro_support::Callsite as _;
                    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                        {
                            static META: ::tracing::Metadata<'static> =
                                {
                                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:149",
                                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                        ::tracing_core::__macro_support::Option::Some(149u32),
                                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                        ::tracing_core::field::FieldSet::new(&[{
                                                            const NAME:
                                                                ::tracing::__macro_support::FieldName<{
                                                                    ::tracing::__macro_support::FieldName::len("borrow_c")
                                                                }> =
                                                                ::tracing::__macro_support::FieldName::new("borrow_c");
                                                            NAME.as_str()
                                                        },
                                                        {
                                                            const NAME:
                                                                ::tracing::__macro_support::FieldName<{
                                                                    ::tracing::__macro_support::FieldName::len("access_c")
                                                                }> =
                                                                ::tracing::__macro_support::FieldName::new("access_c");
                                                            NAME.as_str()
                                                        }], ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                        ::tracing::metadata::Kind::EVENT)
                                };
                            ::tracing::callsite::DefaultCallsite::new(&META)
                        };
                    let enabled =
                        ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::LevelFilter::current() &&
                            {
                                let interest = __CALLSITE.interest();
                                !interest.is_never() &&
                                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                        interest)
                            };
                    if enabled {
                        (|value_set: ::tracing::field::ValueSet|
                                    {
                                        let meta = __CALLSITE.metadata();
                                        ::tracing::Event::dispatch(meta, &value_set);
                                        ;
                                    })({
                                #[allow(unused_imports)]
                                use ::tracing::field::{debug, display, Value};
                                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&::tracing::field::debug(&borrow_c)
                                                            as &dyn ::tracing::field::Value)),
                                                (::tracing::__macro_support::Option::Some(&::tracing::field::debug(&access_c)
                                                            as &dyn ::tracing::field::Value))])
                            });
                    } else { ; }
                };
                match place_projection_conflict(tcx, body, borrow_place,
                        borrow_c, access_c, bias) {
                    Overlap::Arbitrary => {
                        {
                            use ::tracing::__macro_support::Callsite as _;
                            static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                                {
                                    static META: ::tracing::Metadata<'static> =
                                        {
                                            ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:178",
                                                "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                                ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                                ::tracing_core::__macro_support::Option::Some(178u32),
                                                ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                                ::tracing_core::field::FieldSet::new(&["message"],
                                                    ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                                ::tracing::metadata::Kind::EVENT)
                                        };
                                    ::tracing::callsite::DefaultCallsite::new(&META)
                                };
                            let enabled =
                                ::tracing::Level::DEBUG <=
                                            ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                        ::tracing::Level::DEBUG <=
                                            ::tracing::level_filters::LevelFilter::current() &&
                                    {
                                        let interest = __CALLSITE.interest();
                                        !interest.is_never() &&
                                            ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                                interest)
                                    };
                            if enabled {
                                (|value_set: ::tracing::field::ValueSet|
                                            {
                                                let meta = __CALLSITE.metadata();
                                                ::tracing::Event::dispatch(meta, &value_set);
                                                ;
                                            })({
                                        #[allow(unused_imports)]
                                        use ::tracing::field::{debug, display, Value};
                                        __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("arbitrary -> conflict")
                                                                    as &dyn ::tracing::field::Value))])
                                    });
                            } else { ; }
                        };
                        return true;
                    }
                    Overlap::EqualOrDisjoint => {}
                    Overlap::Disjoint => {
                        {
                            use ::tracing::__macro_support::Callsite as _;
                            static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                                {
                                    static META: ::tracing::Metadata<'static> =
                                        {
                                            ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:187",
                                                "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                                ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                                ::tracing_core::__macro_support::Option::Some(187u32),
                                                ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                                ::tracing_core::field::FieldSet::new(&["message"],
                                                    ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                                ::tracing::metadata::Kind::EVENT)
                                        };
                                    ::tracing::callsite::DefaultCallsite::new(&META)
                                };
                            let enabled =
                                ::tracing::Level::DEBUG <=
                                            ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                        ::tracing::Level::DEBUG <=
                                            ::tracing::level_filters::LevelFilter::current() &&
                                    {
                                        let interest = __CALLSITE.interest();
                                        !interest.is_never() &&
                                            ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                                interest)
                                    };
                            if enabled {
                                (|value_set: ::tracing::field::ValueSet|
                                            {
                                                let meta = __CALLSITE.metadata();
                                                ::tracing::Event::dispatch(meta, &value_set);
                                                ;
                                            })({
                                        #[allow(unused_imports)]
                                        use ::tracing::field::{debug, display, Value};
                                        __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("disjoint")
                                                                    as &dyn ::tracing::field::Value))])
                                    });
                            } else { ; }
                        };
                        return false;
                    }
                }
            }
            if borrow_place.projection.len() > access_place.projection.len() {
                for (base, elem) in
                    borrow_place.iter_projections().skip(access_place.projection.len())
                    {
                    let base_ty = base.ty(body, tcx).ty;
                    match (elem, base_ty.kind(), access) {
                        (_, _, Shallow(Some(ArtificialField::ArrayLength))) |
                            (_, _, Shallow(Some(ArtificialField::FakeBorrow))) => {
                            {
                                use ::tracing::__macro_support::Callsite as _;
                                static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                                    {
                                        static META: ::tracing::Metadata<'static> =
                                            {
                                                ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:215",
                                                    "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                                    ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                                    ::tracing_core::__macro_support::Option::Some(215u32),
                                                    ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                                    ::tracing_core::field::FieldSet::new(&["message"],
                                                        ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                                    ::tracing::metadata::Kind::EVENT)
                                            };
                                        ::tracing::callsite::DefaultCallsite::new(&META)
                                    };
                                let enabled =
                                    ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                            ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::LevelFilter::current() &&
                                        {
                                            let interest = __CALLSITE.interest();
                                            !interest.is_never() &&
                                                ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                                    interest)
                                        };
                                if enabled {
                                    (|value_set: ::tracing::field::ValueSet|
                                                {
                                                    let meta = __CALLSITE.metadata();
                                                    ::tracing::Event::dispatch(meta, &value_set);
                                                    ;
                                                })({
                                            #[allow(unused_imports)]
                                            use ::tracing::field::{debug, display, Value};
                                            __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("borrow_conflicts_with_place: implicit field")
                                                                        as &dyn ::tracing::field::Value))])
                                        });
                                } else { ; }
                            };
                            return false;
                        }
                        (ProjectionElem::Deref, _, Shallow(None)) => {
                            {
                                use ::tracing::__macro_support::Callsite as _;
                                static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                                    {
                                        static META: ::tracing::Metadata<'static> =
                                            {
                                                ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:223",
                                                    "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                                    ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                                    ::tracing_core::__macro_support::Option::Some(223u32),
                                                    ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                                    ::tracing_core::field::FieldSet::new(&["message"],
                                                        ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                                    ::tracing::metadata::Kind::EVENT)
                                            };
                                        ::tracing::callsite::DefaultCallsite::new(&META)
                                    };
                                let enabled =
                                    ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                            ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::LevelFilter::current() &&
                                        {
                                            let interest = __CALLSITE.interest();
                                            !interest.is_never() &&
                                                ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                                    interest)
                                        };
                                if enabled {
                                    (|value_set: ::tracing::field::ValueSet|
                                                {
                                                    let meta = __CALLSITE.metadata();
                                                    ::tracing::Event::dispatch(meta, &value_set);
                                                    ;
                                                })({
                                            #[allow(unused_imports)]
                                            use ::tracing::field::{debug, display, Value};
                                            __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("borrow_conflicts_with_place: shallow access behind ptr")
                                                                        as &dyn ::tracing::field::Value))])
                                        });
                                } else { ; }
                            };
                            return false;
                        }
                        (ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Not),
                            _) if
                            !(base.projection.is_empty() &&
                                        body.local_decls[borrow_local].is_ref_to_thread_local()) =>
                            {
                            ::rustc_span::macros::bug_impl(None,
                                format_args!("Tracking borrow behind shared reference."),
                                Location::caller());
                        }
                        (ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Mut),
                            AccessDepth::Drop) => {
                            {
                                use ::tracing::__macro_support::Callsite as _;
                                static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                                    {
                                        static META: ::tracing::Metadata<'static> =
                                            {
                                                ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:237",
                                                    "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                                    ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                                    ::tracing_core::__macro_support::Option::Some(237u32),
                                                    ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                                    ::tracing_core::field::FieldSet::new(&["message"],
                                                        ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                                    ::tracing::metadata::Kind::EVENT)
                                            };
                                        ::tracing::callsite::DefaultCallsite::new(&META)
                                    };
                                let enabled =
                                    ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                            ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::LevelFilter::current() &&
                                        {
                                            let interest = __CALLSITE.interest();
                                            !interest.is_never() &&
                                                ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                                    interest)
                                        };
                                if enabled {
                                    (|value_set: ::tracing::field::ValueSet|
                                                {
                                                    let meta = __CALLSITE.metadata();
                                                    ::tracing::Event::dispatch(meta, &value_set);
                                                    ;
                                                })({
                                            #[allow(unused_imports)]
                                            use ::tracing::field::{debug, display, Value};
                                            __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("borrow_conflicts_with_place: drop access behind ptr")
                                                                        as &dyn ::tracing::field::Value))])
                                        });
                                } else { ; }
                            };
                            return false;
                        }
                        (ProjectionElem::PhantomDeref, _, Shallow(None)) => {
                            {
                                use ::tracing::__macro_support::Callsite as _;
                                static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                                    {
                                        static META: ::tracing::Metadata<'static> =
                                            {
                                                ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:244",
                                                    "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                                    ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                                    ::tracing_core::__macro_support::Option::Some(244u32),
                                                    ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                                    ::tracing_core::field::FieldSet::new(&["message"],
                                                        ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                                    ::tracing::metadata::Kind::EVENT)
                                            };
                                        ::tracing::callsite::DefaultCallsite::new(&META)
                                    };
                                let enabled =
                                    ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                            ::tracing::Level::DEBUG <=
                                                ::tracing::level_filters::LevelFilter::current() &&
                                        {
                                            let interest = __CALLSITE.interest();
                                            !interest.is_never() &&
                                                ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                                    interest)
                                        };
                                if enabled {
                                    (|value_set: ::tracing::field::ValueSet|
                                                {
                                                    let meta = __CALLSITE.metadata();
                                                    ::tracing::Event::dispatch(meta, &value_set);
                                                    ;
                                                })({
                                            #[allow(unused_imports)]
                                            use ::tracing::field::{debug, display, Value};
                                            __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("borrow_conflicts_with_place: shallow access behind reborrow")
                                                                        as &dyn ::tracing::field::Value))])
                                        });
                                } else { ; }
                            };
                            return false;
                        }
                        (ProjectionElem::Field { .. }, ty::Adt(def, _),
                            AccessDepth::Drop) => {
                            if def.has_dtor(tcx) { return true; }
                        }
                        (ProjectionElem::Deref, _, Deep) |
                            (ProjectionElem::Deref, _, AccessDepth::Drop) |
                            (ProjectionElem::PhantomDeref, _, _) |
                            (ProjectionElem::Field { .. }, _, _) |
                            (ProjectionElem::Index { .. }, _, _) |
                            (ProjectionElem::ConstantIndex { .. }, _, _) |
                            (ProjectionElem::Subslice { .. }, _, _) |
                            (ProjectionElem::OpaqueCast { .. }, _, _) |
                            (ProjectionElem::Downcast { .. }, _, _) |
                            (ProjectionElem::UnwrapUnsafeBinder(_), _, _) => {}
                    }
                }
            }
            if borrow_kind == BorrowKind::Fake(FakeBorrowKind::Shallow) &&
                    borrow_place.projection.len() <
                        access_place.projection.len() {
                {
                    use ::tracing::__macro_support::Callsite as _;
                    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                        {
                            static META: ::tracing::Metadata<'static> =
                                {
                                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:291",
                                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                        ::tracing_core::__macro_support::Option::Some(291u32),
                                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                        ::tracing_core::field::FieldSet::new(&["message"],
                                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                        ::tracing::metadata::Kind::EVENT)
                                };
                            ::tracing::callsite::DefaultCallsite::new(&META)
                        };
                    let enabled =
                        ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::LevelFilter::current() &&
                            {
                                let interest = __CALLSITE.interest();
                                !interest.is_never() &&
                                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                        interest)
                            };
                    if enabled {
                        (|value_set: ::tracing::field::ValueSet|
                                    {
                                        let meta = __CALLSITE.metadata();
                                        ::tracing::Event::dispatch(meta, &value_set);
                                        ;
                                    })({
                                #[allow(unused_imports)]
                                use ::tracing::field::{debug, display, Value};
                                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("borrow_conflicts_with_place: shallow borrow")
                                                            as &dyn ::tracing::field::Value))])
                            });
                    } else { ; }
                };
                false
            } else {
                {
                    use ::tracing::__macro_support::Callsite as _;
                    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
                        {
                            static META: ::tracing::Metadata<'static> =
                                {
                                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:294",
                                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                                        ::tracing_core::__macro_support::Option::Some(294u32),
                                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                                        ::tracing_core::field::FieldSet::new(&["message"],
                                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                                        ::tracing::metadata::Kind::EVENT)
                                };
                            ::tracing::callsite::DefaultCallsite::new(&META)
                        };
                    let enabled =
                        ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::STATIC_MAX_LEVEL &&
                                ::tracing::Level::DEBUG <=
                                    ::tracing::level_filters::LevelFilter::current() &&
                            {
                                let interest = __CALLSITE.interest();
                                !interest.is_never() &&
                                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                                        interest)
                            };
                    if enabled {
                        (|value_set: ::tracing::field::ValueSet|
                                    {
                                        let meta = __CALLSITE.metadata();
                                        ::tracing::Event::dispatch(meta, &value_set);
                                        ;
                                    })({
                                #[allow(unused_imports)]
                                use ::tracing::field::{debug, display, Value};
                                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("borrow_conflicts_with_place: full borrow, CONFLICT")
                                                            as &dyn ::tracing::field::Value))])
                            });
                    } else { ; }
                };
                true
            }
        }
    }
}#[instrument(level = "debug", skip(tcx, body))]
131fn place_components_conflict<'tcx>(
132    tcx: TyCtxt<'tcx>,
133    body: &Body<'tcx>,
134    borrow_place: Place<'tcx>,
135    borrow_kind: BorrowKind,
136    access_place: PlaceRef<'tcx>,
137    access: AccessDepth,
138    bias: PlaceConflictBias,
139) -> bool {
140    let borrow_local = borrow_place.local;
141    let access_local = access_place.local;
142    // borrow_conflicts_with_place should have checked that.
143    assert_eq!(borrow_local, access_local);
144
145    // loop invariant: borrow_c is always either equal to access_c or disjoint from it.
146    for ((borrow_place, borrow_c), &access_c) in
147        iter::zip(borrow_place.iter_projections(), access_place.projection)
148    {
149        debug!(?borrow_c, ?access_c);
150
151        // Borrow and access path both have more components.
152        //
153        // Examples:
154        //
155        // - borrow of `a.(...)`, access to `a.(...)`
156        // - borrow of `a.(...)`, access to `b.(...)`
157        //
158        // Here we only see the components we have checked so
159        // far (in our examples, just the first component). We
160        // check whether the components being borrowed vs
161        // accessed are disjoint (as in the second example,
162        // but not the first).
163        match place_projection_conflict(tcx, body, borrow_place, borrow_c, access_c, bias) {
164            Overlap::Arbitrary => {
165                // We have encountered different fields of potentially
166                // the same union - the borrow now partially overlaps.
167                //
168                // There is no *easy* way of comparing the fields
169                // further on, because they might have different types
170                // (e.g., borrows of `u.a.0` and `u.b.y` where `.0` and
171                // `.y` come from different structs).
172                //
173                // We could try to do some things here - e.g., count
174                // dereferences - but that's probably not a good
175                // idea, at least for now, so just give up and
176                // report a conflict. This is unsafe code anyway so
177                // the user could always use raw pointers.
178                debug!("arbitrary -> conflict");
179                return true;
180            }
181            Overlap::EqualOrDisjoint => {
182                // This is the recursive case - proceed to the next element.
183            }
184            Overlap::Disjoint => {
185                // We have proven the borrow disjoint - further
186                // projections will remain disjoint.
187                debug!("disjoint");
188                return false;
189            }
190        }
191    }
192
193    if borrow_place.projection.len() > access_place.projection.len() {
194        for (base, elem) in borrow_place.iter_projections().skip(access_place.projection.len()) {
195            // Borrow path is longer than the access path. Examples:
196            //
197            // - borrow of `a.b.c`, access to `a.b`
198            //
199            // Here, we know that the borrow can access a part of
200            // our place. This is a conflict if that is a part our
201            // access cares about.
202
203            let base_ty = base.ty(body, tcx).ty;
204
205            match (elem, base_ty.kind(), access) {
206                (_, _, Shallow(Some(ArtificialField::ArrayLength)))
207                | (_, _, Shallow(Some(ArtificialField::FakeBorrow))) => {
208                    // The array length is like additional fields on the
209                    // type; it does not overlap any existing data there.
210                    // Furthermore, if cannot actually be a prefix of any
211                    // borrowed place (at least in MIR as it is currently.)
212                    //
213                    // e.g., a (mutable) borrow of `a[5]` while we read the
214                    // array length of `a`.
215                    debug!("borrow_conflicts_with_place: implicit field");
216                    return false;
217                }
218
219                (ProjectionElem::Deref, _, Shallow(None)) => {
220                    // e.g., a borrow of `*x.y` while we shallowly access `x.y` or some
221                    // prefix thereof - the shallow access can't touch anything behind
222                    // the pointer.
223                    debug!("borrow_conflicts_with_place: shallow access behind ptr");
224                    return false;
225                }
226                (ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Not), _)
227                    if !(base.projection.is_empty()
228                        && body.local_decls[borrow_local].is_ref_to_thread_local()) =>
229                {
230                    // The only shared borrows we track are from temporaries created as references
231                    // to thread-local statics. See `crate::place_ext::PlaceExt::ignore_borrow`.
232                    bug!("Tracking borrow behind shared reference.");
233                }
234                (ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Mut), AccessDepth::Drop) => {
235                    // Values behind a mutable reference are not access either by dropping a
236                    // value, or by StorageDead
237                    debug!("borrow_conflicts_with_place: drop access behind ptr");
238                    return false;
239                }
240
241                (ProjectionElem::PhantomDeref, _, Shallow(None)) => {
242                    // e.g., a reborrow of `x.y` while we shallowly access `x.y` or some prefix
243                    // thereof - the shallow access cannot invalidate the reborrowed copy.
244                    debug!("borrow_conflicts_with_place: shallow access behind reborrow");
245                    return false;
246                }
247
248                (ProjectionElem::Field { .. }, ty::Adt(def, _), AccessDepth::Drop) => {
249                    // Drop can read/write arbitrary projections, so places
250                    // conflict regardless of further projections.
251                    if def.has_dtor(tcx) {
252                        return true;
253                    }
254                }
255
256                (ProjectionElem::Deref, _, Deep)
257                | (ProjectionElem::Deref, _, AccessDepth::Drop)
258                | (ProjectionElem::PhantomDeref, _, _)
259                | (ProjectionElem::Field { .. }, _, _)
260                | (ProjectionElem::Index { .. }, _, _)
261                | (ProjectionElem::ConstantIndex { .. }, _, _)
262                | (ProjectionElem::Subslice { .. }, _, _)
263                | (ProjectionElem::OpaqueCast { .. }, _, _)
264                | (ProjectionElem::Downcast { .. }, _, _)
265                | (ProjectionElem::UnwrapUnsafeBinder(_), _, _) => {
266                    // Recursive case. This can still be disjoint on a
267                    // further iteration if this a shallow access and
268                    // there's a deref later on, e.g., a borrow
269                    // of `*x.y` while accessing `x`.
270                }
271            }
272        }
273    }
274
275    // Borrow path ran out but access path may not
276    // have. Examples:
277    //
278    // - borrow of `a.b`, access to `a.b.c`
279    // - borrow of `a.b`, access to `a.b`
280    //
281    // In the first example, where we didn't run out of
282    // access, the borrow can access all of our place, so we
283    // have a conflict.
284    //
285    // If the second example, where we did, then we still know
286    // that the borrow can access a *part* of our place that
287    // our access cares about, so we still have a conflict.
288    if borrow_kind == BorrowKind::Fake(FakeBorrowKind::Shallow)
289        && borrow_place.projection.len() < access_place.projection.len()
290    {
291        debug!("borrow_conflicts_with_place: shallow borrow");
292        false
293    } else {
294        debug!("borrow_conflicts_with_place: full borrow, CONFLICT");
295        true
296    }
297}
298
299// Given that the bases of `elem1` and `elem2` are always either equal
300// or disjoint (and have the same type!), return the overlap situation
301// between `elem1` and `elem2`.
302fn place_projection_conflict<'tcx>(
303    tcx: TyCtxt<'tcx>,
304    body: &Body<'tcx>,
305    pi1: PlaceRef<'tcx>,
306    pi1_elem: PlaceElem<'tcx>,
307    pi2_elem: PlaceElem<'tcx>,
308    bias: PlaceConflictBias,
309) -> Overlap {
310    match (pi1_elem, pi2_elem) {
311        (ProjectionElem::Deref, ProjectionElem::Deref) => {
312            // derefs (e.g., `*x` vs. `*x`) - recur.
313            {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:313",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(313u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-DEREF")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-DEREF");
314            Overlap::EqualOrDisjoint
315        }
316        (ProjectionElem::PhantomDeref, ProjectionElem::PhantomDeref) => {
317            // phantom derefs (e.g., `x` vs. `x`) - recur.
318            {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:318",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(318u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-PHANTOM-DEREF")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-PHANTOM-DEREF");
319            Overlap::EqualOrDisjoint
320        }
321        (ProjectionElem::OpaqueCast(_), ProjectionElem::OpaqueCast(_)) => {
322            // casts to other types may always conflict irrespective of the type being cast to.
323            {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:323",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(323u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-OPAQUE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-OPAQUE");
324            Overlap::EqualOrDisjoint
325        }
326        (ProjectionElem::Field(f1, _), ProjectionElem::Field(f2, _)) => {
327            if f1 == f2 {
328                // same field (e.g., `a.y` vs. `a.y`) - recur.
329                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:329",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(329u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-FIELD")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-FIELD");
330                Overlap::EqualOrDisjoint
331            } else {
332                let ty = pi1.ty(body, tcx).ty;
333                if ty.is_union() {
334                    // Different fields of a union, we are basically stuck.
335                    {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:335",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(335u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: STUCK-UNION")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: STUCK-UNION");
336                    Overlap::Arbitrary
337                } else {
338                    // Different fields of a struct (`a.x` vs. `a.y`). Disjoint!
339                    {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:339",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(339u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-FIELD")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-FIELD");
340                    Overlap::Disjoint
341                }
342            }
343        }
344        (ProjectionElem::Downcast(_, v1), ProjectionElem::Downcast(_, v2)) => {
345            // different variants are treated as having disjoint fields,
346            // even if they occupy the same "space", because it's
347            // impossible for 2 variants of the same enum to exist
348            // (and therefore, to be borrowed) at the same time.
349            //
350            // Note that this is different from unions - we *do* allow
351            // this code to compile:
352            //
353            // ```
354            // fn foo(x: &mut Result<i32, i32>) {
355            //     let mut v = None;
356            //     if let Ok(ref mut a) = *x {
357            //         v = Some(a);
358            //     }
359            //     // here, you would *think* that the
360            //     // *entirety* of `x` would be borrowed,
361            //     // but in fact only the `Ok` variant is,
362            //     // so the `Err` variant is *entirely free*:
363            //     if let Err(ref mut a) = *x {
364            //         v = Some(a);
365            //     }
366            //     drop(v);
367            // }
368            // ```
369            if v1 == v2 {
370                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:370",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(370u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-FIELD")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-FIELD");
371                Overlap::EqualOrDisjoint
372            } else {
373                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:373",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(373u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-FIELD")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-FIELD");
374                Overlap::Disjoint
375            }
376        }
377        (
378            ProjectionElem::Index(..),
379            ProjectionElem::Index(..)
380            | ProjectionElem::ConstantIndex { .. }
381            | ProjectionElem::Subslice { .. },
382        )
383        | (
384            ProjectionElem::ConstantIndex { .. } | ProjectionElem::Subslice { .. },
385            ProjectionElem::Index(..),
386        ) => {
387            // Array indexes (`a[0]` vs. `a[i]`). These can either be disjoint
388            // (if the indexes differ) or equal (if they are the same).
389            match bias {
390                PlaceConflictBias::Overlap => {
391                    // If we are biased towards overlapping, then this is the recursive
392                    // case that gives "equal *or* disjoint" its meaning.
393                    {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:393",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(393u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-INDEX")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-INDEX");
394                    Overlap::EqualOrDisjoint
395                }
396                PlaceConflictBias::NoOverlap => {
397                    // If we are biased towards no overlapping, then this is disjoint.
398                    {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:398",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(398u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-ARRAY-INDEX")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-ARRAY-INDEX");
399                    Overlap::Disjoint
400                }
401            }
402        }
403        (
404            ProjectionElem::ConstantIndex { offset: o1, min_length: _, from_end: false },
405            ProjectionElem::ConstantIndex { offset: o2, min_length: _, from_end: false },
406        )
407        | (
408            ProjectionElem::ConstantIndex { offset: o1, min_length: _, from_end: true },
409            ProjectionElem::ConstantIndex { offset: o2, min_length: _, from_end: true },
410        ) => {
411            if o1 == o2 {
412                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:412",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(412u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX");
413                Overlap::EqualOrDisjoint
414            } else {
415                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:415",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(415u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-ARRAY-CONSTANT-INDEX")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-ARRAY-CONSTANT-INDEX");
416                Overlap::Disjoint
417            }
418        }
419        (
420            ProjectionElem::ConstantIndex {
421                offset: offset_from_begin,
422                min_length: min_length1,
423                from_end: false,
424            },
425            ProjectionElem::ConstantIndex {
426                offset: offset_from_end,
427                min_length: min_length2,
428                from_end: true,
429            },
430        )
431        | (
432            ProjectionElem::ConstantIndex {
433                offset: offset_from_end,
434                min_length: min_length1,
435                from_end: true,
436            },
437            ProjectionElem::ConstantIndex {
438                offset: offset_from_begin,
439                min_length: min_length2,
440                from_end: false,
441            },
442        ) => {
443            // both patterns matched so it must be at least the greater of the two
444            let min_length = max(min_length1, min_length2);
445            // `offset_from_end` can be in range `[1..min_length]`, 1 indicates the last
446            // element (like -1 in Python) and `min_length` the first.
447            // Therefore, `min_length - offset_from_end` gives the minimal possible
448            // offset from the beginning
449            if offset_from_begin >= min_length - offset_from_end {
450                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:450",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(450u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX-FE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX-FE");
451                Overlap::EqualOrDisjoint
452            } else {
453                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:453",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(453u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-ARRAY-CONSTANT-INDEX-FE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-ARRAY-CONSTANT-INDEX-FE");
454                Overlap::Disjoint
455            }
456        }
457        (
458            ProjectionElem::ConstantIndex { offset, min_length: _, from_end: false },
459            ProjectionElem::Subslice { from, to, from_end: false },
460        )
461        | (
462            ProjectionElem::Subslice { from, to, from_end: false },
463            ProjectionElem::ConstantIndex { offset, min_length: _, from_end: false },
464        ) => {
465            if (from..to).contains(&offset) {
466                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:466",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(466u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX-SUBSLICE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-CONSTANT-INDEX-SUBSLICE");
467                Overlap::EqualOrDisjoint
468            } else {
469                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:469",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(469u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-ARRAY-CONSTANT-INDEX-SUBSLICE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-ARRAY-CONSTANT-INDEX-SUBSLICE");
470                Overlap::Disjoint
471            }
472        }
473        (
474            ProjectionElem::ConstantIndex { offset, min_length: _, from_end: false },
475            ProjectionElem::Subslice { from, .. },
476        )
477        | (
478            ProjectionElem::Subslice { from, .. },
479            ProjectionElem::ConstantIndex { offset, min_length: _, from_end: false },
480        ) => {
481            if offset >= from {
482                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:482",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(482u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-SLICE-CONSTANT-INDEX-SUBSLICE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-SLICE-CONSTANT-INDEX-SUBSLICE");
483                Overlap::EqualOrDisjoint
484            } else {
485                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:485",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(485u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-SLICE-CONSTANT-INDEX-SUBSLICE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-SLICE-CONSTANT-INDEX-SUBSLICE");
486                Overlap::Disjoint
487            }
488        }
489        (
490            ProjectionElem::ConstantIndex { offset, min_length: _, from_end: true },
491            ProjectionElem::Subslice { to, from_end: true, .. },
492        )
493        | (
494            ProjectionElem::Subslice { to, from_end: true, .. },
495            ProjectionElem::ConstantIndex { offset, min_length: _, from_end: true },
496        ) => {
497            if offset > to {
498                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:498",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(498u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-SLICE-CONSTANT-INDEX-SUBSLICE-FE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!(
499                    "place_element_conflict: \
500                       DISJOINT-OR-EQ-SLICE-CONSTANT-INDEX-SUBSLICE-FE"
501                );
502                Overlap::EqualOrDisjoint
503            } else {
504                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:504",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(504u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-SLICE-CONSTANT-INDEX-SUBSLICE-FE")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-SLICE-CONSTANT-INDEX-SUBSLICE-FE");
505                Overlap::Disjoint
506            }
507        }
508        (
509            ProjectionElem::Subslice { from: f1, to: t1, from_end: false },
510            ProjectionElem::Subslice { from: f2, to: t2, from_end: false },
511        ) => {
512            if f2 >= t1 || f1 >= t2 {
513                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:513",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(513u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-ARRAY-SUBSLICES")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-ARRAY-SUBSLICES");
514                Overlap::Disjoint
515            } else {
516                {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:516",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(516u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-SUBSLICES")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-ARRAY-SUBSLICES");
517                Overlap::EqualOrDisjoint
518            }
519        }
520        (ProjectionElem::Subslice { .. }, ProjectionElem::Subslice { .. }) => {
521            {
    use ::tracing::__macro_support::Callsite as _;
    static __CALLSITE: ::tracing::callsite::DefaultCallsite =
        {
            static META: ::tracing::Metadata<'static> =
                {
                    ::tracing_core::metadata::Metadata::new("event /rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs:521",
                        "rustc_borrowck::places_conflict", ::tracing::Level::DEBUG,
                        ::tracing_core::__macro_support::Option::Some("/rustc-dev/249c1e4e31111b54ad2483cfd4cea06c7020c653/compiler/rustc_borrowck/src/places_conflict.rs"),
                        ::tracing_core::__macro_support::Option::Some(521u32),
                        ::tracing_core::__macro_support::Option::Some("rustc_borrowck::places_conflict"),
                        ::tracing_core::field::FieldSet::new(&["message"],
                            ::tracing_core::callsite::Identifier(&__CALLSITE)),
                        ::tracing::metadata::Kind::EVENT)
                };
            ::tracing::callsite::DefaultCallsite::new(&META)
        };
    let enabled =
        ::tracing::Level::DEBUG <= ::tracing::level_filters::STATIC_MAX_LEVEL
                &&
                ::tracing::Level::DEBUG <=
                    ::tracing::level_filters::LevelFilter::current() &&
            {
                let interest = __CALLSITE.interest();
                !interest.is_never() &&
                    ::tracing::__macro_support::__is_enabled(__CALLSITE.metadata(),
                        interest)
            };
    if enabled {
        (|value_set: ::tracing::field::ValueSet|
                    {
                        let meta = __CALLSITE.metadata();
                        ::tracing::Event::dispatch(meta, &value_set);
                        ;
                    })({
                #[allow(unused_imports)]
                use ::tracing::field::{debug, display, Value};
                __CALLSITE.metadata().fields().value_set_all(&[(::tracing::__macro_support::Option::Some(&format_args!("place_element_conflict: DISJOINT-OR-EQ-SLICE-SUBSLICES")
                                            as &dyn ::tracing::field::Value))])
            });
    } else { ; }
};debug!("place_element_conflict: DISJOINT-OR-EQ-SLICE-SUBSLICES");
522            Overlap::EqualOrDisjoint
523        }
524        (
525            ProjectionElem::Deref
526            | ProjectionElem::PhantomDeref
527            | ProjectionElem::Field(..)
528            | ProjectionElem::Index(..)
529            | ProjectionElem::ConstantIndex { .. }
530            | ProjectionElem::OpaqueCast { .. }
531            | ProjectionElem::Subslice { .. }
532            | ProjectionElem::Downcast(..),
533            _,
534        ) => ::rustc_span::macros::bug_impl(None,
    format_args!("mismatched projections in place_element_conflict: {0:?} and {1:?}",
        pi1_elem, pi2_elem), Location::caller())bug!(
535            "mismatched projections in place_element_conflict: {:?} and {:?}",
536            pi1_elem,
537            pi2_elem
538        ),
539
540        (ProjectionElem::UnwrapUnsafeBinder(_), _) => {
541            ::core::panicking::unimplemented_default_msg()unimplemented!()
542        }
543    }
544}