Crate rustc_borrowck

source Β·
Expand description

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


  • borrowck_errors πŸ”’
  • constraints πŸ”’
  • A public API provided for the Rust compiler consumers. This file provides API for compiler consumers.
  • dataflow πŸ”’
  • def_use πŸ”’
  • diagnostics πŸ”’
    Borrow checker diagnostics.
  • diags πŸ”’
  • facts πŸ”’
  • location πŸ”’
  • 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 πŸ”’
    Functions dedicated to fact generation for the -Zpolonius=legacy datalog implementation.
  • 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.b is borrowed. But: writing a is legal if *a is borrowed, whether or not a is a shared or mutable reference. […] β€œ
  • region_infer πŸ”’
  • renumber πŸ”’
  • type_check πŸ”’
    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:
  • used_muts πŸ”’
  • util πŸ”’



  • AccessDepth πŸ”’
  • ArtificialField πŸ”’
  • 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)


  • 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.