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:
Matthias Krüger 2025-02-21 12:45:24 +01:00 committed by GitHub
commit 72861ea7e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 36 deletions

View file

@ -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()