Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 30 additions & 18 deletions compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1273,16 +1273,22 @@ where
return ControlFlow::Break(Err(NoSolution));
};

if let ty::Placeholder(p) = ty.kind() {
if p.universe() == ty::UniverseIndex::ROOT {
ControlFlow::Break(Ok(()))
} else {
ControlFlow::Continue(())
match ty.kind() {
ty::Placeholder(p) => {
if p.universe() == ty::UniverseIndex::ROOT {
ControlFlow::Break(Ok(()))
} else {
ControlFlow::Continue(())
}
}
} else if ty.has_type_flags(TypeFlags::HAS_PLACEHOLDER | TypeFlags::HAS_RE_INFER) {
ty.super_visit_with(self)
} else {
ControlFlow::Continue(())
ty::Infer(_) => ControlFlow::Break(Ok(())),
_ if ty.has_type_flags(
TypeFlags::HAS_PLACEHOLDER | TypeFlags::HAS_INFER | TypeFlags::HAS_ALIAS,
) =>
{
ty.super_visit_with(self)
}
_ => ControlFlow::Continue(()),
}
}

Expand All @@ -1292,16 +1298,22 @@ where
return ControlFlow::Break(Err(NoSolution));
};

if let ty::ConstKind::Placeholder(p) = ct.kind() {
if p.universe() == ty::UniverseIndex::ROOT {
ControlFlow::Break(Ok(()))
} else {
ControlFlow::Continue(())
match ct.kind() {
ty::ConstKind::Placeholder(p) => {
if p.universe() == ty::UniverseIndex::ROOT {
ControlFlow::Break(Ok(()))
} else {
ControlFlow::Continue(())
}
}
} else if ct.has_type_flags(TypeFlags::HAS_PLACEHOLDER | TypeFlags::HAS_RE_INFER) {
ct.super_visit_with(self)
} else {
ControlFlow::Continue(())
ty::ConstKind::Infer(_) => ControlFlow::Break(Ok(())),
_ if ct.has_type_flags(
TypeFlags::HAS_PLACEHOLDER | TypeFlags::HAS_INFER | TypeFlags::HAS_ALIAS,
) =>
{
ct.super_visit_with(self)
}
_ => ControlFlow::Continue(()),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ error[E0275]: overflow evaluating the requirement `<T as Trait>::Assoc: Trait`
LL | <T as Trait>::Assoc: Trait,
| ^^^^^

error: aborting due to 1 previous error
error[E0275]: overflow evaluating the requirement `<T as Trait>::Assoc well-formed`
--> $DIR/normalize-param-env-4.rs:19:26
|
LL | <T as Trait>::Assoc: Trait,
| ^^^^^

error[E0275]: overflow evaluating the requirement `T: Trait`
--> $DIR/normalize-param-env-4.rs:32:19
|
LL | impls_trait::<T>();
| ^
|
note: required by a bound in `impls_trait`
--> $DIR/normalize-param-env-4.rs:15:19
|
LL | fn impls_trait<T: Trait>() {}
| ^^^^^ required by this bound in `impls_trait`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0275`.
Loading