Open
Description
affected test
- tests/ui/type-alias-impl-trait/in-where-clause.rs
#![feature(type_alias_impl_trait)]
type Bar = impl Sized;
fn foo() -> Bar
where
Bar: Send,
{
[0; 1 + 2]
}
fn main() {}
This encounters a query cycle with the old solver as evaluating 1 + 2
ends up normalizing the where-clause Bar: Send
, normalizing Bar
relies on type checking foo
as its a defining use. We encounter these cycles whenever there's an opaque type in a where-clause of its defining scope and we evaluate a constant during typeck.
The new solver does not eagerly normalize its ParamEnv
when switching to post analysis, causing us to only fail with a cycle error when actually trying to use that where-bound.
Metadata
Metadata
Assignees
Type
Projects
Status
potentially irrelevant