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`.
This commit is contained in:
parent
835e6a694b
commit
90bd46bfc3
1 changed files with 1 additions and 1 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