Avoid some unnecessary symbol interning.

- `Ident::from_str_and_span` -> `Ident::new` when the string is
  pre-interned.
- `Ident::from_str` -> `Ident::with_dummy_span` when the string is
  pre-interned.
- `_d` and `_e` are unused.
This commit is contained in:
Nicholas Nethercote 2025-05-30 02:29:06 +10:00
parent 76d583ba0e
commit ee648edd90

View file

@ -56,7 +56,7 @@ fn is_impl_not_trait_with_bool_out<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -
.and_then(|trait_id| {
cx.tcx.associated_items(trait_id).find_by_ident_and_kind(
cx.tcx,
Ident::from_str("Output"),
Ident::with_dummy_span(sym::Output),
ty::AssocTag::Type,
trait_id,
)