File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -1627,17 +1627,31 @@ impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ParamEnv<'tcx> {
1627
1627
folder : & mut F ,
1628
1628
) -> Result < Self , F :: Error > {
1629
1629
Ok ( ParamEnv :: new (
1630
- self . caller_bounds ( ) . try_fold_with ( folder) ?,
1631
- self . reveal ( ) . try_fold_with ( folder) ?,
1632
- self . constness ( ) ,
1630
+ rustc_type_ir:: prefer_noop_traversal_if_applicable!(
1631
+ { self . caller_bounds( ) } . try_fold_with( folder)
1632
+ ) ?,
1633
+ rustc_type_ir:: prefer_noop_traversal_if_applicable!(
1634
+ { self . reveal( ) } . try_fold_with( folder)
1635
+ ) ?,
1636
+ rustc_type_ir:: prefer_noop_traversal_if_applicable!(
1637
+ { self . constness( ) } . try_fold_with( folder)
1638
+ ) ?,
1633
1639
) )
1634
1640
}
1635
1641
}
1636
1642
1637
1643
impl < ' tcx > TypeVisitable < TyCtxt < ' tcx > > for ParamEnv < ' tcx > {
1638
1644
fn visit_with < V : TypeVisitor < TyCtxt < ' tcx > > > ( & self , visitor : & mut V ) -> ControlFlow < V :: BreakTy > {
1639
- self . caller_bounds ( ) . visit_with ( visitor) ?;
1640
- self . reveal ( ) . visit_with ( visitor)
1645
+ rustc_type_ir:: prefer_noop_traversal_if_applicable!(
1646
+ { & self . caller_bounds( ) } . visit_with( visitor)
1647
+ ) ?;
1648
+ rustc_type_ir:: prefer_noop_traversal_if_applicable!(
1649
+ { & self . reveal( ) } . visit_with( visitor)
1650
+ ) ?;
1651
+ rustc_type_ir:: prefer_noop_traversal_if_applicable!(
1652
+ { & self . constness( ) } . visit_with( visitor)
1653
+ ) ?;
1654
+ ControlFlow :: Continue ( ( ) )
1641
1655
}
1642
1656
}
1643
1657
You can’t perform that action at this time.
0 commit comments