It's not about types or consts, but the lack of regions
This commit is contained in:
parent
ead49f0beb
commit
c7b6ebdf7c
30 changed files with 71 additions and 77 deletions
|
@ -728,7 +728,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
)
|
||||
}
|
||||
(Err(ErrorHandled::TooGeneric), _) | (_, Err(ErrorHandled::TooGeneric)) => {
|
||||
if c1.has_infer_types_or_consts() || c2.has_infer_types_or_consts() {
|
||||
if c1.has_non_region_infer() || c2.has_non_region_infer() {
|
||||
Ok(EvaluatedToAmbig)
|
||||
} else {
|
||||
// Two different constants using generic parameters ~> error.
|
||||
|
@ -1520,7 +1520,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
if !generics.params.is_empty()
|
||||
&& obligation.predicate.substs[generics.parent_count..]
|
||||
.iter()
|
||||
.any(|&p| p.has_infer_types_or_consts() && self.infcx.shallow_resolve(p) != p)
|
||||
.any(|&p| p.has_non_region_infer() && self.infcx.shallow_resolve(p) != p)
|
||||
{
|
||||
ProjectionMatchesProjection::Ambiguous
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue