Skip to content

Commit

Permalink
Rollup merge of #137299 - nnethercote:simplify-PostOrder-customizatio…
Browse files Browse the repository at this point in the history
…n, 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````
  • Loading branch information
matthiaskrgr authored Feb 21, 2025
2 parents a81c264 + 90bd46b commit 85329db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_utils/src/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 85329db

Please sign in to comment.