From e4127f3e9650c7665a5ff5763d7bdf8403942cf5 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 1 Apr 2023 16:03:46 +0200 Subject: [PATCH] more --- src/passes/item_deleter.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/passes/item_deleter.rs b/src/passes/item_deleter.rs index 18f1335..a398b33 100644 --- a/src/passes/item_deleter.rs +++ b/src/passes/item_deleter.rs @@ -32,8 +32,15 @@ impl<'a> Visitor<'a> { fn consider_deleting_item(&mut self, item: &Item) -> bool { match item { Item::Impl(impl_) => { - self.current_path - .push(impl_.self_ty.clone().into_token_stream().to_string()); + self.current_path.push(format!( + "({}) for ({})", + impl_ + .trait_ + .as_ref() + .map(|(_, tr, _)| tr.into_token_stream().to_string()) + .unwrap_or_default(), + impl_.self_ty.clone().into_token_stream() + )); let should_retain = self.should_retain_item();