-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE: delay_span_bug
: error performing ParamEnvAnd
#103899
Comments
Simplified it further trait BaseWithAssoc {
type Assoc;
}
trait WrapperWithAssoc {
type BaseAssoc: BaseWithAssoc;
}
struct Wrapper<B> {
inner: B,
}
struct ProjectToBase<T: BaseWithAssoc> {
data_type_h: T::Assoc,
}
struct DoubleProject<L: WrapperWithAssoc> {
buffer: Wrapper<ProjectToBase<L::BaseAssoc>>,
}
fn trigger<L: WrapperWithAssoc<BaseAssoc = ()>>() -> DoubleProject<L> {
loop {}
}
fn main() {} |
@rustbot claim |
This issue basically hinges on the fact that this code is considered well-formed: trait Foo {
type Assoc: Bar;
}
trait Bar {}
fn test<T: Foo<Assoc = S>, S>() {} Even though trait Foo {
type Assoc: Bar;
}
trait Bar {
type Assoc2;
}
struct Wrapper<T: Foo> {
inner: <<T as Foo>::Assoc as Bar>::Assoc2,
_i: (),
}
fn test<T: Foo<Assoc = S>, S>(s: Wrapper<T>) {
let _ = s.inner;
//~^ ERROR the trait bound `S: Bar` is not satisfied
} However, sometimes we don't observe this projection during HIR typeck, but only during drop elaboration... which is not designed to handle associated type normalization errors 😓 This is evident by commenting out that |
That does sound like something that needs more discussion, so I'll @rustbot release-assignment |
…imulacrum Add a few known-bug tests The labels of these tests should be changed from `S-bug-has-mcve` to `S-bug-has-test` once this is merged. cc: rust-lang#101518 rust-lang#99492 rust-lang#90950 rust-lang#89196 rust-lang#104034 rust-lang#101350 rust-lang#103705 rust-lang#103899 I couldn't reproduce the failures in rust-lang#101962 and rust-lang#100772 (so either these have started passing, or I didn't repro properly), so leaving those out for now. rust-lang#102065 was a bit more complicated, since it uses `rustc_private` and I didn't want to mess with that.
Result::unwrap()
on an Err
value: NoSolution', compiler/rustc_borrowck/src/type_check/liveness/trace.rs:574:88delay_span_bug
: error performing ParamEnvAnd
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
Code
Meta
rustc --version --verbose
:Also happens on:
Error output
Backtrace
The text was updated successfully, but these errors were encountered: