pub type PoloniusInput = AllFacts<RustcFacts>;

Aliased Type§

struct PoloniusInput {
Show 18 fields pub loan_issued_at: Vec<(RegionVid, BorrowIndex, LocationIndex), Global>, pub universal_region: Vec<RegionVid, Global>, pub cfg_edge: Vec<(LocationIndex, LocationIndex), Global>, pub loan_killed_at: Vec<(BorrowIndex, LocationIndex), Global>, pub subset_base: Vec<(RegionVid, RegionVid, LocationIndex), Global>, pub loan_invalidated_at: Vec<(LocationIndex, BorrowIndex), Global>, pub var_used_at: Vec<(Local, LocationIndex), Global>, pub var_defined_at: Vec<(Local, LocationIndex), Global>, pub var_dropped_at: Vec<(Local, LocationIndex), Global>, pub use_of_var_derefs_origin: Vec<(Local, RegionVid), Global>, pub drop_of_var_derefs_origin: Vec<(Local, RegionVid), Global>, pub child_path: Vec<(MovePathIndex, MovePathIndex), Global>, pub path_is_var: Vec<(MovePathIndex, Local), Global>, pub path_assigned_at_base: Vec<(MovePathIndex, LocationIndex), Global>, pub path_moved_at_base: Vec<(MovePathIndex, LocationIndex), Global>, pub path_accessed_at_base: Vec<(MovePathIndex, LocationIndex), Global>, pub known_placeholder_subset: Vec<(RegionVid, RegionVid), Global>, pub placeholder: Vec<(RegionVid, BorrowIndex), Global>,
}

Fields§

§loan_issued_at: Vec<(RegionVid, BorrowIndex, LocationIndex), Global>

loan_issued_at(origin, loan, point) indicates that the loan was “issued” at the given point, creating a reference with the origin. Effectively, origin may refer to data from loan starting at point (this is usually the point after a borrow rvalue).

§universal_region: Vec<RegionVid, Global>

universal_region(origin) – this is a “free region” within fn body

§cfg_edge: Vec<(LocationIndex, LocationIndex), Global>

cfg_edge(point1, point2) for each edge point1 -> point2 in the control flow

§loan_killed_at: Vec<(BorrowIndex, LocationIndex), Global>

loan_killed_at(loan, point) when some prefix of the path borrowed at loan is assigned at point. Indicates that the path borrowed by the loan has changed in some way that the loan no longer needs to be tracked. (In particular, mutations to the path that was borrowed no longer invalidate the loan)

§subset_base: Vec<(RegionVid, RegionVid, LocationIndex), Global>

subset_base(origin1, origin2, point) when we require origin1@point: origin2@point. Indicates that origin1 <= origin2 – i.e., the set of loans in origin1 are a subset of those in origin2.

§loan_invalidated_at: Vec<(LocationIndex, BorrowIndex), Global>

loan_invalidated_at(point, loan) indicates that the loan is invalidated by some action taking place at point; if any origin that references this loan is live, this is an error.

§var_used_at: Vec<(Local, LocationIndex), Global>

var_used_at(var, point) when the variable var is used for anything but a drop at point

§var_defined_at: Vec<(Local, LocationIndex), Global>

var_defined_at(var, point) when the variable var is overwritten at point

§var_dropped_at: Vec<(Local, LocationIndex), Global>

var_dropped_at(var, point) when the variable var is used in a drop at point

§use_of_var_derefs_origin: Vec<(Local, RegionVid), Global>

use_of_var_derefs_origin(variable, origin): References with the given origin may be dereferenced when the variable is used.

In rustc, we generate this whenever the type of the variable includes the given origin.

§drop_of_var_derefs_origin: Vec<(Local, RegionVid), Global>

drop_of_var_derefs_origin(var, origin) when the type of var includes the origin and uses it when dropping

§child_path: Vec<(MovePathIndex, MovePathIndex), Global>

child_path(child, parent) when the path child is the direct child of parent, e.g. child_path(x.y, x), but not child_path(x.y.z, x).

§path_is_var: Vec<(MovePathIndex, Local), Global>

path_is_var(path, var) the root path path starting in variable var.

§path_assigned_at_base: Vec<(MovePathIndex, LocationIndex), Global>

path_assigned_at_base(path, point) when the path was initialized at point point. This fact is only emitted for a prefix path, and not for the implicit initialization of all of path’s children. E.g. a statement like x.y = 3 at point would give the fact path_assigned_at_base(x.y, point) (but neither path_assigned_at_base(x.y.z, point) nor path_assigned_at_base(x, point)).

§path_moved_at_base: Vec<(MovePathIndex, LocationIndex), Global>

path_moved_at_base(path, point) when the path was moved at point. The same logic is applied as for path_assigned_at_base above.

§path_accessed_at_base: Vec<(MovePathIndex, LocationIndex), Global>

path_accessed_at_base(path, point) when the path was accessed at point point. The same logic as for path_assigned_at_base and path_moved_at_base applies.

§known_placeholder_subset: Vec<(RegionVid, RegionVid), Global>

These reflect the 'a: 'b relations that are either declared by the user on function declarations or which are inferred via implied bounds. For example: fn foo<'a, 'b: 'a, 'c>(x: &'c &'a u32) would have two entries:

  • one for the user-supplied subset 'b: 'a
  • and one for the 'a: 'c implied bound from the x parameter, (note that the transitive relation 'b: 'c is not necessarily included explicitly, but rather inferred by polonius).
§placeholder: Vec<(RegionVid, BorrowIndex), Global>

placeholder(origin, loan) describes a placeholder origin, with its associated placeholder loan.

Trait Implementations§

source§

impl AllFactsExt for AllFacts

source§

fn enabled(tcx: TyCtxt<'_>) -> bool

Return

source§

fn write_to_dir( &self, dir: impl AsRef<Path>, location_table: &LocationTable ) -> Result<(), Box<dyn Error>>

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 432 bytes