Skip to content

Commit 85329db

Browse files
authored
Rollup merge of rust-lang#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````
2 parents a81c264 + 90bd46b commit 85329db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/mir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn visit_local_usage(locals: &[Local], mir: &Body<'_>, location: Location) -
3030
locals.len()
3131
];
3232

33-
traversal::Postorder::new(&mir.basic_blocks, location.block, ())
33+
traversal::Postorder::new(&mir.basic_blocks, location.block, None)
3434
.collect::<Vec<_>>()
3535
.into_iter()
3636
.rev()

0 commit comments

Comments
 (0)