about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-19 14:08:52 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-20 14:00:36 +1100
commit90bd46bfc3e3a7c1ff67e7693f1b354264bb253b (patch)
treef59d8fc3fa88a965c3555464a15a6cfca8ea96be
parent835e6a694b543af769c84a99659505b2418d640e (diff)
downloadrust-90bd46bfc3e3a7c1ff67e7693f1b354264bb253b.tar.gz
rust-90bd46bfc3e3a7c1ff67e7693f1b354264bb253b.zip
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`.
-rw-r--r--clippy_utils/src/mir/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/mir/mod.rs b/clippy_utils/src/mir/mod.rs
index 637c0bafd96..ffcfcd240ea 100644
--- a/clippy_utils/src/mir/mod.rs
+++ b/clippy_utils/src/mir/mod.rs
@@ -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()