Crate rustc_borrowck
source ·Expand description
This query borrow-checks the MIR to (further) ensure it is not broken.
Modules§
- A public API provided for the Rust compiler consumers. This file provides API for compiler consumers.
- dataflow 🔒
- def_use 🔒
- Borrow checker diagnostics.
- diags 🔒
- facts 🔒
- location 🔒
- nll 🔒The entry point of the NLL borrow checker.
- 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 treatOverlapas a monoid and report a conflict if the product ends up not beingDisjoint.
- polonius 🔒Functions dedicated to fact generation for the-Zpolonius=legacydatalog implementation.
- prefixes 🔒From the NLL RFC: “Shallow prefixes are found by stripping away fields, but stop at any dereference. So: writing a path likeais illegal ifa.bis borrowed. But: writingais legal if*ais borrowed, whether or notais a shared or mutable reference. […] “
- renumber 🔒
- This pass type-checks the MIR to ensure it is not broken.
- Code to extract the universally quantified regions declared on a function and the relationships between them. For example:
- util 🔒
Structs§
- Associate some local constants with the'tcxlifetime
Enums§
- 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)
- Kind of access to a value: read or write (For informational purposes only)
- Kind of write access to a value (For informational purposes only)
Statics§
- Raw content of Fluent resource for this crate, generated byfluent_messagesmacro, imported byrustc_driverto include all crates’ resources in one bundle.
Functions§
- Perform the actual borrow checking.