diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-19 14:08:52 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-20 14:00:36 +1100 |
| commit | 90bd46bfc3e3a7c1ff67e7693f1b354264bb253b (patch) | |
| tree | f59d8fc3fa88a965c3555464a15a6cfca8ea96be | |
| parent | 835e6a694b543af769c84a99659505b2418d640e (diff) | |
| download | rust-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.rs | 2 |
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() |
