Skip to content

Commit

Permalink
Unrolled build for rust-lang#136627
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#136627 - RalfJung:mir-validation-cfg-checker, r=compiler-errors

MIR validation: add comment explaining the limitations of CfgChecker

I hope this right but I am not sure.^^
Cc `@compiler-errors` `@lcnr` `@cjgillot` `@oli-obk`
  • Loading branch information
rust-timer authored Feb 7, 2025
2 parents 5ff18d0 + 5934e0a commit e8c8276
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/rustc_mir_transform/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ impl<'tcx> crate::MirPass<'tcx> for Validator {
}
}

/// This checker covers basic properties of the control-flow graph, (dis)allowed statements and terminators.
/// Everything checked here must be stable under substitution of generic parameters. In other words,
/// this is about the *structure* of the MIR, not the *contents*.
///
/// Everything that depends on types, or otherwise can be affected by generic parameters,
/// must be checked in `TypeChecker`.
struct CfgChecker<'a, 'tcx> {
when: &'a str,
body: &'a Body<'tcx>,
Expand Down

0 comments on commit e8c8276

Please sign in to comment.