1
Fork 0
rename ui tests

check if res is trait def

fix typo

regression test for #137554
This commit is contained in:
Takayuki Maeda 2025-02-26 04:12:20 +09:00
parent bdc97d1046
commit b7a549725c
5 changed files with 78 additions and 1 deletions

View file

@ -789,7 +789,11 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
Some(args.constraints.iter().filter_map(|constraint| {
let ident = constraint.ident;
let trait_def = path.res.def_id();
let Res::Def(DefKind::Trait, trait_def) = path.res else {
return None;
};
let assoc_item = tcx.associated_items(trait_def).find_by_name_and_kind(
tcx,
ident,