[][src]Struct rustc_mir::borrow_check::MirBorrowckCtxt

pub(crate) struct MirBorrowckCtxt<'cx, 'tcx> {
    pub(crate) infcx: &'cx InferCtxt<'cx, 'tcx>,
    body: &'cx Body<'tcx>,
    mir_def_id: DefId,
    param_env: ParamEnv<'tcx>,
    move_data: &'cx MoveData<'tcx>,
    location_table: &'cx LocationTable,
    movable_generator: bool,
    locals_are_invalidated_at_exit: bool,
    access_place_error_reported: FxHashSet<(Place<'tcx>, Span)>,
    reservation_error_reported: FxHashSet<Place<'tcx>>,
    reservation_warnings: FxHashMap<BorrowIndex, (Place<'tcx>, Span, Location, BorrowKind, BorrowData<'tcx>)>,
    move_error_reported: BTreeMap<Vec<MoveOutIndex>, (PlaceRef<'cx, 'tcx>, DiagnosticBuilder<'cx>)>,
    uninitialized_error_reported: FxHashSet<PlaceRef<'cx, 'tcx>>,
    errors_buffer: Vec<Diagnostic>,
    used_mut: FxHashSet<Local>,
    used_mut_upvars: SmallVec<[Field; 8]>,
    nonlexical_regioncx: Rc<RegionInferenceContext<'tcx>>,
    borrow_set: Rc<BorrowSet<'tcx>>,
    dominators: Dominators<BasicBlock>,
    upvars: Vec<Upvar>,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Fields

infcx: &'cx InferCtxt<'cx, 'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

body: &'cx Body<'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

mir_def_id: DefId
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

param_env: ParamEnv<'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

move_data: &'cx MoveData<'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

location_table: &'cx LocationTable
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Map from MIR Location to LocationIndex; created when MIR borrowck begins.

movable_generator: bool
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

locals_are_invalidated_at_exit: bool
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This keeps track of whether local variables are free-ed when the function exits even without a StorageDead, which appears to be the case for constants.

I'm not sure this is the right approach - @eddyb could you try and figure this out?

access_place_error_reported: FxHashSet<(Place<'tcx>, Span)>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This field keeps track of when borrow errors are reported in the access_place function so that there is no duplicate reporting. This field cannot also be used for the conflicting borrow errors that is handled by the reservation_error_reported field as the inclusion of the Span type (while required to mute some errors) stops the muting of the reservation errors.

reservation_error_reported: FxHashSet<Place<'tcx>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This field keeps track of when borrow conflict errors are reported for reservations, so that we don't report seemingly duplicate errors for corresponding activations.

reservation_warnings: FxHashMap<BorrowIndex, (Place<'tcx>, Span, Location, BorrowKind, BorrowData<'tcx>)>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Migration warnings to be reported for #56254. We delay reporting these so that we can suppress the warning if there's a corresponding error for the activation of the borrow.

move_error_reported: BTreeMap<Vec<MoveOutIndex>, (PlaceRef<'cx, 'tcx>, DiagnosticBuilder<'cx>)>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This field keeps track of move errors that are to be reported for given move indicies.

There are situations where many errors can be reported for a single move out (see #53807) and we want only the best of those errors.

The report_use_of_moved_or_uninitialized function checks this map and replaces the diagnostic (if there is one) if the Place of the error being reported is a prefix of the Place of the previous most diagnostic. This happens instead of buffering the error. Once all move errors have been reported, any diagnostics in this map are added to the buffer to be emitted.

BTreeMap is used to preserve the order of insertions when iterating. This is necessary when errors in the map are being re-added to the error buffer so that errors with the same primary span come out in a consistent order.

uninitialized_error_reported: FxHashSet<PlaceRef<'cx, 'tcx>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This field keeps track of errors reported in the checking of uninitialized variables, so that we don't report seemingly duplicate errors.

errors_buffer: Vec<Diagnostic>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Errors to be reported buffer

used_mut: FxHashSet<Local>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This field keeps track of all the local variables that are declared mut and are mutated. Used for the warning issued by an unused mutable local variable.

used_mut_upvars: SmallVec<[Field; 8]>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

If the function we're checking is a closure, then we'll need to report back the list of mutable upvars that have been used. This field keeps track of them.

nonlexical_regioncx: Rc<RegionInferenceContext<'tcx>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Non-lexical region inference context, if NLL is enabled. This contains the results from region inference and lets us e.g. find out which CFG points are contained in each borrow region.

borrow_set: Rc<BorrowSet<'tcx>>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The set of borrows extracted from the MIR

dominators: Dominators<BasicBlock>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Dominators for MIR

upvars: Vec<Upvar>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Information about upvars not necessarily preserved in types or MIR

Methods

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(super) fn add_moved_or_invoked_closure_note(
    &self,
    location: Location,
    place: PlaceRef<'cx, 'tcx>,
    diag: &mut DiagnosticBuilder
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Adds a suggestion when a closure is invoked twice with a moved variable or when a closure is moved after being invoked.

note: closure cannot be invoked more than once because it moves the variable `dict` out of
      its environment
  --> $DIR/issue-42065.rs:16:29
   |
LL |         for (key, value) in dict {
   |                             ^^^^

pub(super) fn describe_place(
    &self,
    place_ref: PlaceRef<'cx, 'tcx>
) -> Option<String>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

End-user visible description of place if one can be found. If the place is a temporary for instance, None will be returned.

pub(super) fn describe_place_with_options(
    &self,
    place: PlaceRef<'cx, 'tcx>,
    including_downcast: IncludingDowncast
) -> Option<String>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

End-user visible description of place if one can be found. If the place is a temporary for instance, None will be returned. IncludingDowncast parameter makes the function return Err if ProjectionElem is Downcast and IncludingDowncast is true

fn append_place_to_string(
    &self,
    place: PlaceRef<'cx, 'tcx>,
    buf: &mut String,
    autoderef: bool,
    including_downcast: &IncludingDowncast
) -> Result<(), ()>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Appends end-user visible description of place to buf.

fn append_local_to_string(
    &self,
    local_index: Local,
    buf: &mut String
) -> Result<(), ()>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Appends end-user visible description of the local place to buf. If local doesn't have a name, or its name was generated by the compiler, then Err is returned

fn describe_field(&self, place: PlaceRef<'cx, 'tcx>, field: Field) -> String[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

End-user visible description of the fieldnth field of base

fn describe_field_from_ty(
    &self,
    ty: Ty,
    field: Field,
    variant_index: Option<VariantIdx>
) -> String
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

End-user visible description of the field_indexnth field of ty

pub fn is_place_thread_local(&self, place_ref: PlaceRef<'cx, 'tcx>) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Checks if a place is a thread-local static.

pub(super) fn note_type_does_not_implement_copy<'a>(
    &self,
    err: &mut DiagnosticBuilder<'a>,
    place_desc: &str,
    ty: Ty<'tcx>,
    span: Option<Span>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Add a note that a type does not implement Copy

pub(super) fn borrowed_content_source(
    &self,
    deref_base: PlaceRef<'cx, 'tcx>
) -> BorrowedContentSource<'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(super) fn get_name_for_ty(
    &self,
    ty: Ty<'tcx>,
    counter: usize
) -> String
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Return the name of the provided Ty (that must be a reference) with a synthesized lifetime name where required.

pub(super) fn get_region_name_for_ty(
    &self,
    ty: Ty<'tcx>,
    counter: usize
) -> String
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns the name of the provided Ty (that must be a reference)'s region with a synthesized lifetime name where required.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(super) fn move_spans(
    &self,
    moved_place: PlaceRef<'cx, 'tcx>,
    location: Location
) -> UseSpans
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Finds the spans associated to a move or copy of move_place at location.

pub(super) fn borrow_spans(
    &self,
    use_span: Span,
    location: Location
) -> UseSpans
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Finds the span of arguments of a closure (within maybe_closure_span) and its usage of the local assigned at location. This is done by searching in statements succeeding location and originating from maybe_closure_span.

fn closure_span(
    &self,
    def_id: DefId,
    target_place: PlaceRef<'cx, 'tcx>,
    places: &Vec<Operand<'tcx>>
) -> Option<(Span, Option<GeneratorKind>, Span)>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Finds the span of a captured variable within a closure or generator.

pub(super) fn retrieve_borrow_spans(
    &self,
    borrow: &BorrowData
) -> UseSpans
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Helper to retrieve span(s) of given borrow from the current MIR representation

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(super) fn report_use_of_moved_or_uninitialized(
    &mut self,
    location: Location,
    desired_action: InitializationRequiringAction,
    (moved_place, used_place, span): (PlaceRef<'cx, 'tcx>, PlaceRef<'cx, 'tcx>, Span),
    mpi: MovePathIndex
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(super) fn report_move_out_while_borrowed(
    &mut self,
    location: Location,
    (place, span): (&Place<'tcx>, Span),
    borrow: &BorrowData<'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(super) fn report_use_while_mutably_borrowed(
    &mut self,
    location: Location,
    (place, _span): (&Place<'tcx>, Span),
    borrow: &BorrowData<'tcx>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(super) fn report_conflicting_borrow(
    &mut self,
    location: Location,
    (place, span): (&Place<'tcx>, Span),
    gen_borrow_kind: BorrowKind,
    issued_borrow: &BorrowData<'tcx>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(super) fn describe_place_for_conflicting_borrow(
    &self,
    first_borrowed_place: &Place<'tcx>,
    second_borrowed_place: &Place<'tcx>
) -> (String, String, String, String)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns the description of the root place for a conflicting borrow and the full descriptions of the places that caused the conflict.

In the simplest case, where there are no unions involved, if a mutable borrow of x is attempted while a shared borrow is live, then this function will return:

("x", "", "")

In the simple union case, if a mutable borrow of a union field x.z is attempted while a shared borrow of another field x.y, then this function will return:

("x", "x.z", "x.y")

In the more complex union case, where the union is a field of a struct, then if a mutable borrow of a union field in a struct x.u.z is attempted while a shared borrow of another field x.u.y, then this function will return:

("x.u", "x.u.z", "x.u.y")

This is used when creating error messages like below:

cannot borrow a.u (via a.u.z.c) as immutable because it is also borrowed as mutable (via a.u.s.b) [E0502]

pub(super) fn report_borrowed_value_does_not_live_long_enough(
    &mut self,
    location: Location,
    borrow: &BorrowData<'tcx>,
    place_span: (&Place<'tcx>, Span),
    kind: Option<WriteKind>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Reports StorageDeadOrDrop of place conflicts with borrow.

This means that some data referenced by borrow needs to live past the point where the StorageDeadOrDrop of place occurs. This is usually interpreted as meaning that place has too short a lifetime. (But sometimes it is more useful to report it as a more direct conflict between the execution of a Drop::drop with an aliasing borrow.)

fn report_local_value_does_not_live_long_enough(
    &mut self,
    location: Location,
    name: &str,
    borrow: &BorrowData<'tcx>,
    drop_span: Span,
    borrow_spans: UseSpans,
    explanation: BorrowExplanation
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_borrow_conflicts_with_destructor(
    &mut self,
    location: Location,
    borrow: &BorrowData<'tcx>,
    (place, drop_span): (&Place<'tcx>, Span),
    kind: Option<WriteKind>,
    dropped_ty: Ty<'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_thread_local_value_does_not_live_long_enough(
    &mut self,
    drop_span: Span,
    borrow_span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_temporary_value_does_not_live_long_enough(
    &mut self,
    location: Location,
    borrow: &BorrowData<'tcx>,
    drop_span: Span,
    borrow_spans: UseSpans,
    proper_span: Span,
    explanation: BorrowExplanation
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn try_report_cannot_return_reference_to_local(
    &self,
    borrow: &BorrowData<'tcx>,
    borrow_span: Span,
    return_span: Span,
    category: ConstraintCategory,
    opt_place_desc: Option<&String>
) -> Option<DiagnosticBuilder<'cx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_escaping_closure_capture(
    &mut self,
    use_span: UseSpans,
    var_span: Span,
    fr_name: &RegionName,
    category: ConstraintCategory,
    constraint_span: Span,
    captured_var: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_escaping_data(
    &mut self,
    borrow_span: Span,
    name: &Option<String>,
    upvar_span: Span,
    upvar_name: &str,
    escape_span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn get_moved_indexes(
    &mut self,
    location: Location,
    mpi: MovePathIndex
) -> Vec<MoveSite>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(super) fn report_illegal_mutation_of_borrowed(
    &mut self,
    location: Location,
    (place, span): (&Place<'tcx>, Span),
    loan: &BorrowData<'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(super) fn report_illegal_reassignment(
    &mut self,
    _location: Location,
    (place, span): (&Place<'tcx>, Span),
    assigned_span: Span,
    err_place: &Place<'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Reports an illegal reassignment; for example, an assignment to (part of) a non-mut local that occurs potentially after that local has already been initialized. place is the path being assigned; err_place is a place providing a reason why place is not mutable (e.g., the non-mut local x in an assignment to x.f).

fn classify_drop_access_kind(
    &self,
    place: PlaceRef<'cx, 'tcx>
) -> StorageDeadOrDrop<'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn classify_immutable_section(
    &self,
    place: &Place<'tcx>
) -> Option<&'static str>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Describe the reason for the fake borrow that was assigned to place.

fn annotate_argument_and_return_for_borrow(
    &self,
    borrow: &BorrowData<'tcx>
) -> Option<AnnotatedBorrowFnSignature<'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Annotate argument and return type of function and closure with (synthesized) lifetime for borrow of local value that does not live long enough.

fn annotate_fn_sig(
    &self,
    did: DefId,
    sig: PolyFnSig<'tcx>
) -> Option<AnnotatedBorrowFnSignature<'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Annotate the first argument and return type of a function signature if they are references.

impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx>[src]

pub(crate) fn report_move_errors(
    &mut self,
    move_errors: Vec<(Place<'tcx>, MoveError<'tcx>)>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn group_move_errors(
    &self,
    errors: Vec<(Place<'tcx>, MoveError<'tcx>)>
) -> Vec<GroupedMoveError<'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn append_to_grouped_errors(
    &self,
    grouped_errors: &mut Vec<GroupedMoveError<'tcx>>,
    original_path: Place<'tcx>,
    error: MoveError<'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn append_binding_error(
    &self,
    grouped_errors: &mut Vec<GroupedMoveError<'tcx>>,
    kind: IllegalMoveOriginKind<'tcx>,
    original_path: Place<'tcx>,
    move_from: &Place<'tcx>,
    bind_to: Local,
    match_place: &Option<Place<'tcx>>,
    match_span: Span,
    statement_span: Span
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report(&mut self, error: GroupedMoveError<'tcx>)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_cannot_move_from_static(
    &mut self,
    place: &Place<'tcx>,
    span: Span
) -> DiagnosticBuilder<'a>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn report_cannot_move_from_borrowed_content(
    &mut self,
    move_place: &Place<'tcx>,
    deref_target_place: &Place<'tcx>,
    span: Span
) -> DiagnosticBuilder<'a>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn add_move_hints(
    &self,
    error: GroupedMoveError<'tcx>,
    err: &mut DiagnosticBuilder<'a>,
    span: Span
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn add_move_error_suggestions(
    &self,
    err: &mut DiagnosticBuilder<'a>,
    binds_to: &[Local]
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn add_move_error_details(
    &self,
    err: &mut DiagnosticBuilder<'a>,
    binds_to: &[Local]
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx>[src]

pub(super) fn report_mutability_error<'cx>(
    &mut self,
    access_place: &Place<'tcx>,
    span: Span,
    the_place_err: PlaceRef<'cx, 'tcx>,
    error_access: AccessKind,
    location: Location
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

Important traits for Prefixes<'cx, 'tcx>
pub(super) fn prefixes(
    &self,
    place_ref: PlaceRef<'cx, 'tcx>,
    kind: PrefixSet
) -> Prefixes<'cx, 'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over the prefixes of place (inclusive) from longest to smallest, potentially terminating the iteration early based on kind.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(crate) fn gather_used_muts(
    &mut self,
    temporary_used_locals: FxHashSet<Local>,
    never_initialized_mut_locals: FxHashSet<Local>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Walks the MIR adding to the set of used_mut locals that will be ignored for the purposes of the unused_mut lint.

temporary_used_locals should contain locals that were found to be temporary, mutable and used from borrow checking. This function looks for assignments into these locals from user-declared locals and adds those user-defined locals to the used_mut set. This can occur due to a rare case involving upvars in closures.

never_initialized_mut_locals should contain the set of user-declared mutable locals (not arguments) that have not already been marked as being used. This function then looks for assignments from statements or the terminator into the locals from this set and removes them from the set. This leaves only those locals that have not been assigned to - this set is used as a proxy for locals that were not initialized due to unreachable code. These locals are then considered "used" to silence the lint for them. See #55344 for context.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(in crate::borrow_check) fn explain_why_borrow_contains_point(
    &self,
    location: Location,
    borrow: &BorrowData<'tcx>,
    kind_place: Option<(WriteKind, &Place<'tcx>)>
) -> BorrowExplanation
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns structured explanation for why the borrow contains the point from location. This is key for the "3-point errors" described in the NLL RFC.

Parameters

  • borrow: the borrow in question
  • location: where the borrow occurs
  • kind_place: if Some, this describes the statement that triggered the error.
    • first half is the kind of write, if any, being performed
    • second half is the place being accessed

fn is_use_in_later_iteration_of_loop(
    &self,
    borrow_location: Location,
    use_location: Location
) -> bool
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

true if borrow_location can reach use_location by going through a loop and use_location is also inside of that loop

fn reach_through_backedge(
    &self,
    from: Location,
    to: Location
) -> Option<Location>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns the outmost back edge if from location can reach to location passing through that back edge

fn can_reach_head_of_loop(&self, from: Location, loop_head: Location) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

true if from location can reach loop_head location and loop_head dominates all the intermediate nodes

fn find_loop_head_dfs(
    &self,
    from: Location,
    loop_head: Location,
    visited_locations: &mut FxHashSet<Location>
) -> bool
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn is_back_edge(&self, source: Location, target: Location) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

True if an edge source -> target is a backedge -- in other words, if the target dominates the source.

fn later_use_kind(
    &self,
    borrow: &BorrowData<'tcx>,
    use_spans: UseSpans,
    location: Location
) -> (LaterUseKind, Span)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Determine how the borrow was later used.

fn was_captured_by_trait_object(&self, borrow: &BorrowData<'tcx>) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Checks if a borrowed value was captured by a trait object. We do this by looking forward in the MIR from the reserve location and checking if we see a unsized cast to a trait object on our data.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

fn access_place(
    &mut self,
    location: Location,
    place_span: (&Place<'tcx>, Span),
    kind: (AccessDepth, ReadOrWrite),
    is_local_mutation_allowed: LocalMutationIsAllowed,
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Checks an access to the given place to see if it is allowed. Examines the set of borrows that are in scope, as well as which paths have been initialized, to ensure that (a) the place is initialized and (b) it is not borrowed in some way that would prevent this access.

Returns true if an error is reported.

fn check_access_for_conflict(
    &mut self,
    location: Location,
    place_span: (&Place<'tcx>, Span),
    sd: AccessDepth,
    rw: ReadOrWrite,
    flow_state: &Flows<'cx, 'tcx>
) -> bool
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn mutate_place(
    &mut self,
    location: Location,
    place_span: (&'cx Place<'tcx>, Span),
    kind: AccessDepth,
    mode: MutateMode,
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn consume_rvalue(
    &mut self,
    location: Location,
    (rvalue, span): (&'cx Rvalue<'tcx>, Span),
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn propagate_closure_used_mut_upvar(&mut self, operand: &Operand<'tcx>)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn consume_operand(
    &mut self,
    location: Location,
    (operand, span): (&'cx Operand<'tcx>, Span),
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn check_for_invalidation_at_exit(
    &mut self,
    location: Location,
    borrow: &BorrowData<'tcx>,
    span: Span
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Checks whether a borrow of this place is invalidated when the function exits

fn check_for_local_borrow(
    &mut self,
    borrow: &BorrowData<'tcx>,
    yield_span: Span
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Reports an error if this is a borrow of local data. This is called for all Yield statements on movable generators

fn check_activations(
    &mut self,
    location: Location,
    span: Span,
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

fn check_if_reassignment_to_immutable_state(
    &mut self,
    location: Location,
    local: Local,
    place_span: (&Place<'tcx>, Span),
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn check_if_full_path_is_moved(
    &mut self,
    location: Location,
    desired_action: InitializationRequiringAction,
    place_span: (PlaceRef<'cx, 'tcx>, Span),
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn check_if_path_or_subpath_is_moved(
    &mut self,
    location: Location,
    desired_action: InitializationRequiringAction,
    place_span: (PlaceRef<'cx, 'tcx>, Span),
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn move_path_closest_to(
    &mut self,
    place: PlaceRef<'cx, 'tcx>
) -> Result<(PlaceRef<'cx, 'tcx>, MovePathIndex), NoMovePathFound>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Currently MoveData does not store entries for all places in the input MIR. For example it will currently filter out places that are Copy; thus we do not track places of shared reference type. This routine will walk up a place along its prefixes, searching for a foundational place that is tracked in the MoveData.

An Err result includes a tag indicated why the search failed. Currently this can only occur if the place is built off of a static variable, as we do not track those in the MoveData.

fn move_path_for_place(
    &mut self,
    place: PlaceRef<'cx, 'tcx>
) -> Option<MovePathIndex>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn check_if_assigned_path_is_moved(
    &mut self,
    location: Location,
    (place, span): (&'cx Place<'tcx>, Span),
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn check_access_permissions(
    &mut self,
    (place, span): (&Place<'tcx>, Span),
    kind: ReadOrWrite,
    is_local_mutation_allowed: LocalMutationIsAllowed,
    flow_state: &Flows<'cx, 'tcx>,
    location: Location
) -> bool
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Checks the permissions for the given place and read or write kind

Returns true if an error is reported.

fn is_local_ever_initialized(
    &self,
    local: Local,
    flow_state: &Flows<'cx, 'tcx>
) -> Option<InitIndex>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn add_used_mut<'d>(
    &mut self,
    root_place: RootPlace<'d, 'tcx>,
    flow_state: &Flows<'cx, 'tcx>
)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Adds the place into the used mutable variables set

fn is_mutable<'d>(
    &self,
    place: PlaceRef<'d, 'tcx>,
    is_local_mutation_allowed: LocalMutationIsAllowed
) -> Result<RootPlace<'d, 'tcx>, PlaceRef<'d, 'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Whether this value can be written or borrowed mutably. Returns the root place if the place passed in is a projection.

pub fn is_upvar_field_projection(
    &self,
    place_ref: PlaceRef<'cx, 'tcx>
) -> Option<Field>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

If place is a field projection, and the field is being projected from a closure type, then returns the index of the field being projected. Note that this closure will always be self in the current MIR, because that is the only time we directly access the fields of a closure type.

impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx>[src]

pub(crate) fn cannot_move_when_borrowed(
    &self,
    span: Span,
    desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_use_when_mutably_borrowed(
    &self,
    span: Span,
    desc: &str,
    borrow_span: Span,
    borrow_desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_act_on_uninitialized_variable(
    &self,
    span: Span,
    verb: &str,
    desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_mutably_borrow_multiply(
    &self,
    new_loan_span: Span,
    desc: &str,
    opt_via: &str,
    old_loan_span: Span,
    old_opt_via: &str,
    old_load_end_span: Option<Span>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_uniquely_borrow_by_two_closures(
    &self,
    new_loan_span: Span,
    desc: &str,
    old_loan_span: Span,
    old_load_end_span: Option<Span>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_uniquely_borrow_by_one_closure(
    &self,
    new_loan_span: Span,
    container_name: &str,
    desc_new: &str,
    opt_via: &str,
    old_loan_span: Span,
    noun_old: &str,
    old_opt_via: &str,
    previous_end_span: Option<Span>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_reborrow_already_uniquely_borrowed(
    &self,
    new_loan_span: Span,
    container_name: &str,
    desc_new: &str,
    opt_via: &str,
    kind_new: &str,
    old_loan_span: Span,
    old_opt_via: &str,
    previous_end_span: Option<Span>,
    second_borrow_desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_reborrow_already_borrowed(
    &self,
    span: Span,
    desc_new: &str,
    msg_new: &str,
    kind_new: &str,
    old_span: Span,
    noun_old: &str,
    kind_old: &str,
    msg_old: &str,
    old_load_end_span: Option<Span>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_assign_to_borrowed(
    &self,
    span: Span,
    borrow_span: Span,
    desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_reassign_immutable(
    &self,
    span: Span,
    desc: &str,
    is_arg: bool
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_assign(
    &self,
    span: Span,
    desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_move_out_of(
    &self,
    move_from_span: Span,
    move_from_desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_move_out_of_interior_noncopy(
    &self,
    move_from_span: Span,
    ty: Ty,
    is_index: Option<bool>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Signal an error due to an attempt to move out of the interior of an array or slice. is_index is None when error origin didn't capture whether there was an indexing operation or not.

pub(crate) fn cannot_move_out_of_interior_of_drop(
    &self,
    move_from_span: Span,
    container_ty: Ty
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_act_on_moved_value(
    &self,
    use_span: Span,
    verb: &str,
    optional_adverb_for_moved: &str,
    moved_path: Option<String>
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_borrow_path_as_mutable_because(
    &self,
    span: Span,
    path: &str,
    reason: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_mutate_in_immutable_section(
    &self,
    mutate_span: Span,
    immutable_span: Span,
    immutable_place: &str,
    immutable_section: &str,
    action: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_borrow_across_generator_yield(
    &self,
    span: Span,
    yield_span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_borrow_across_destructor(
    &self,
    borrow_span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn path_does_not_live_long_enough(
    &self,
    span: Span,
    path: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_return_reference_to_local(
    &self,
    span: Span,
    return_kind: &str,
    reference_desc: &str,
    path_desc: &str
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn cannot_capture_in_long_lived_closure(
    &self,
    closure_span: Span,
    borrowed_path: &str,
    capture_span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn thread_local_value_does_not_live_long_enough(
    &self,
    span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub(crate) fn temporary_value_borrowed_for_too_long(
    &self,
    span: Span
) -> DiagnosticBuilder<'cx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

fn struct_span_err_with_code<S: Into<MultiSpan>>(
    &self,
    sp: S,
    msg: &str,
    code: DiagnosticId
) -> DiagnosticBuilder<'tcx>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<'cx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'tcx>[src]

type FlowState = Flows<'cx, 'tcx>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Auto Trait Implementations

impl<'cx, 'tcx> !Send for MirBorrowckCtxt<'cx, 'tcx>

impl<'cx, 'tcx> !Sync for MirBorrowckCtxt<'cx, 'tcx>

impl<'cx, 'tcx> Unpin for MirBorrowckCtxt<'cx, 'tcx> where
    'tcx: 'cx, 

impl<'cx, 'tcx> !UnwindSafe for MirBorrowckCtxt<'cx, 'tcx>

impl<'cx, 'tcx> !RefUnwindSafe for MirBorrowckCtxt<'cx, 'tcx>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E[src]

impl<T> Erased for T[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]