1
Fork 0

Rollup merge of #98012 - compiler-errors:poly-trait-refs-are-traits, r=cjgillot

`ValuePairs::PolyTraitRefs` should be called "trait"s in type error diagnostics

Pretty simple, we already do this for `ValuePairs::TraitRefs`...
This commit is contained in:
Dylan DPC 2022-06-12 12:14:30 +02:00 committed by GitHub
commit 53090fefd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 29 deletions

View file

@ -1588,7 +1588,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
Mismatch::Variable(infer::ExpectedFound { expected, found }),
)
}
ValuePairs::TraitRefs(_) => (false, Mismatch::Fixed("trait")),
ValuePairs::TraitRefs(_) | ValuePairs::PolyTraitRefs(_) => {
(false, Mismatch::Fixed("trait"))
}
_ => (false, Mismatch::Fixed("type")),
};
let vals = match self.values_str(values) {