Crate rustc_passes

Source
Expand description

Various checks

Β§Note

This API is completely unstable and subject to change.

Modules§

  • check_attr πŸ”’
    This module implements some validity checks for attributes. In particular it verifies that #[inline] and #[repr] attributes are attached to items that actually support them and if there are conflicts between multiple such attributes attached to the same item.
  • check_const πŸ”’
    This pass checks HIR bodies that may be evaluated at compile-time (e.g., const, static, const fn) for structured control flow (e.g. if, while), which is forbidden in a const context.
  • Detecting usage of the #[debugger_visualizer] attribute.
  • diagnostic_items πŸ”’
    Detecting diagnostic items.
  • errors πŸ”’
  • lang_items πŸ”’
    Detecting lang items.
  • lib_features πŸ”’
    Detecting lib features (i.e., features that are not lang features).
  • liveness πŸ”’
    A classic liveness analysis based on dataflow over the AST. Computes, for each local variable in a function, whether that variable is live at a given point. Program execution points are identified by their IDs.
  • naked_functions πŸ”’
    Checks validity of naked functions.
  • reachable πŸ”’
    Finds local items that are β€œreachable”, which means that other crates need access to their compiled code or their runtime MIR. (Compile-time MIR is always encoded anyway, so we don’t worry about that here.)
  • A pass that annotates every item and method with its stability level, propagating default levels lexically from parent to children ast nodes.
  • upvars πŸ”’
    Upvar (closure capture) collection from cross-body HIR uses of Res::Locals.
  • weak_lang_items πŸ”’
    Validity checking for weak lang items

Statics§

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

Functions§