Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes
This commit is contained in:
parent
84b9b6d16c
commit
4501ae89f1
18 changed files with 25 additions and 17 deletions
|
@ -1781,7 +1781,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
// FIXME(generic-associated-types): This only detects one layer of inference,
|
||||
// which is probably not what we actually want, but fixing it causes some ambiguity:
|
||||
// <https://github.com/rust-lang/rust/issues/125196>.
|
||||
if !generics.own_params.is_empty()
|
||||
if !generics.is_own_empty()
|
||||
&& obligation.predicate.args[generics.parent_count..].iter().any(|&p| {
|
||||
p.has_non_region_infer()
|
||||
&& match p.unpack() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue