rustc_borrowck - Rust (original) (raw)

Crate rustc_borrowck

Source

Expand description

This query borrow-checks the MIR to (further) ensure it is not broken.

borrow_set πŸ”’

borrowck_errors πŸ”’

constraints πŸ”’

consumers

A public API provided for the Rust compiler consumers. This file provides API for compiler consumers.

dataflow πŸ”’

def_use πŸ”’

diagnostics πŸ”’

Borrow checker diagnostics.

member_constraints πŸ”’

nll πŸ”’

The entry point of the NLL borrow checker.

path_utils πŸ”’

place_ext πŸ”’

places_conflict πŸ”’

The borrowck rules for proving disjointness are applied from the β€œroot” of the borrow forwards, iterating over β€œsimilar” projections in lockstep until we can prove overlap one way or another. Essentially, we treat Overlap as a monoid and report a conflict if the product ends up not being Disjoint.

polonius πŸ”’

Polonius analysis and support code:

prefixes πŸ”’

From the NLL RFC: β€œShallow prefixes are found by stripping away fields, but stop at any dereference. So: writing a path like a is illegal if a.bis borrowed. But: writing a is legal if *a is borrowed, whether or not a is a shared or mutable reference. […] β€œ

region_infer πŸ”’

renumber πŸ”’

root_cx πŸ”’

session_diagnostics πŸ”’

type_check πŸ”’

This pass type-checks the MIR to ensure it is not broken.

universal_regions πŸ”’

Code to extract the universally quantified regions declared on a function and the relationships between them. For example:

used_muts πŸ”’

BorrowckInferCtxt πŸ”’

ClosureOutlivesRequirement

Indicates an outlives-constraint between a type or between two free regions declared on the closure.

ClosureOutlivesSubjectTy

Represents a ty::Ty for use in ClosureOutlivesSubject.

ClosureRegionRequirements

After we borrow check a closure, we are left with various requirements that we have inferred between the free regions that appear in the closure’s signature or on its field types. These requirements are then verified and proved by the closure’s creating function. This struct encodes those requirements.

MirBorrowckCtxt πŸ”’

PropagatedBorrowCheckResults πŸ”’

Data propagated to the typeck parent by nested items. This should always be empty for the typeck root.

RootPlace πŸ”’

TyCtxtConsts πŸ”’

Associate some local constants with the 'tcx lifetime

AccessDepth πŸ”’

ArtificialField πŸ”’

ClosureOutlivesSubject

The subject of a ClosureOutlivesRequirement – that is, the thing that must outlive some region.

InitializationRequiringAction πŸ”’

LocalMutationIsAllowed πŸ”’

When checking permissions for a place access, this flag is used to indicate that an immutable local place can be mutated.

Overlap πŸ”’

The degree of overlap between 2 places for borrow-checking.

ReadKind πŸ”’

Kind of read access to a value (For informational purposes only)

ReadOrWrite πŸ”’

Kind of access to a value: read or write (For informational purposes only)

WriteKind πŸ”’

Kind of write access to a value (For informational purposes only)

DEFAULT_LOCALE_RESOURCE

Raw content of Fluent resource for this crate, generated by fluent_messages macro, imported by rustc_driver to include all crates’ resources in one bundle.

do_mir_borrowck πŸ”’

Perform the actual borrow checking.

get_flow_results πŸ”’

mir_borrowck πŸ”’

Provider for query mir_borrowck. Similar to typeck, this must only be called for typeck roots which will then borrowck all nested bodies as well.

provide