Skip to content

Commit

Permalink
Simplify Postorder customization.
Browse files Browse the repository at this point in the history
`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`.
  • Loading branch information
nnethercote committed Feb 20, 2025
1 parent 835e6a6 commit 90bd46b
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 90bd46b

Please sign in to comment.