Rollup merge of #91888 - BoxyUwU:generic_arg_infer_aaaa, r=lcnr
Handle unordered const/ty generics for object lifetime defaults *feel like I should have a PR description but cant think of what to put here* r? ```@lcnr```
This commit is contained in:
commit
6b00227666
5 changed files with 30 additions and 21 deletions
|
@ -2541,8 +2541,8 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
|||
GenericParamDefKind::Type { object_lifetime_default, .. } => {
|
||||
Some(object_lifetime_default)
|
||||
}
|
||||
GenericParamDefKind::Lifetime
|
||||
| GenericParamDefKind::Const { .. } => None,
|
||||
GenericParamDefKind::Const { .. } => Some(Set1::Empty),
|
||||
GenericParamDefKind::Lifetime => None,
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
|
@ -2569,12 +2569,11 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
|||
}
|
||||
GenericArg::Const(ct) => {
|
||||
self.visit_anon_const(&ct.value);
|
||||
i += 1;
|
||||
}
|
||||
GenericArg::Infer(inf) => {
|
||||
self.visit_id(inf.hir_id);
|
||||
if inf.kind.is_type() {
|
||||
i += 1;
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue