Rollup merge of #137299 - nnethercote:simplify-PostOrder-customization, r=compiler-errors
Simplify `Postorder` customization. `Postorder` has a `C: Customization<'tcx>` parameter, that gives it flexibility about how it computes successors. But in practice, there are only two `impls` of `Customization`, and one is for the unit type. This commit simplifies things by removing the generic parameter and replacing it with an `Option`. r? ````@saethlin````
This commit is contained in:
commit
72861ea7e2
3 changed files with 15 additions and 36 deletions
|
|
@ -30,7 +30,7 @@ pub fn visit_local_usage(locals: &[Local], mir: &Body<'_>, location: Location) -
|
|||
locals.len()
|
||||
];
|
||||
|
||||
traversal::Postorder::new(&mir.basic_blocks, location.block, ())
|
||||
traversal::Postorder::new(&mir.basic_blocks, location.block, None)
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter()
|
||||
.rev()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue