Rollup merge of #137613 - davidtwco:const-traits-variances, r=compiler-errors
hir_analysis: skip self type of host effect preds in variances_of Discovered as part of an implementation of rust-lang/rfcs#3729 - w/out this then when introducing const trait bounds: many more interesting tests change with different output, missing errors, new errors, etc related to this but they all depend on feature flags and are much more complex than this test. r? ``@oli-obk``
This commit is contained in:
commit
cf8498d36a
3 changed files with 25 additions and 0 deletions
|
@ -198,6 +198,10 @@ fn variance_of_opaque(
|
|||
ty::ClauseKind::Trait(ty::TraitPredicate {
|
||||
trait_ref: ty::TraitRef { def_id: _, args, .. },
|
||||
polarity: _,
|
||||
})
|
||||
| ty::ClauseKind::HostEffect(ty::HostEffectPredicate {
|
||||
trait_ref: ty::TraitRef { def_id: _, args, .. },
|
||||
constness: _,
|
||||
}) => {
|
||||
for arg in &args[1..] {
|
||||
arg.visit_with(&mut collector);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue