Skip to content

Commit dcde4c5

Browse files
committed
MIR validation: add comment explaining the limitations of CfgChecker
1 parent 820bfff commit dcde4c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: compiler/rustc_mir_transform/src/validate.rs

+5
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ impl<'tcx> crate::MirPass<'tcx> for Validator {
9797
}
9898
}
9999

100+
/// This checker covers basic properties of the control-flow graph, (dis)allowed statements and terminators.
101+
/// Everything checked here must be stable under substitution of generic parameters.
102+
///
103+
/// Everything that depends on types, or otherwise can be affected by generic paramters,
104+
/// muts be checked in `TypeChecker`.
100105
struct CfgChecker<'a, 'tcx> {
101106
when: &'a str,
102107
body: &'a Body<'tcx>,

0 commit comments

Comments
 (0)