-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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: feature(test), requires two tests in lib #78632
Comments
This code compiles on 1.43 (on stable with @rustbot modify labels: regression-from-stable-to-stable |
This still produces an ICE (removed the use of the pub trait Corge<T> {
type Fred;
}
impl Corge<u8> for () {
type Fred = u32;
}
pub trait Waldo {
type Quax;
}
impl Waldo for u32 {
type Quax = u8;
}
pub trait Grault
where
(): Corge<Self::Thud>,
{
type Thud;
fn bar(_: <() as Corge<Self::Thud>>::Fred) {}
}
impl<T> Grault for T
where
T: Waldo,
(): Corge<T::Quax>,
<() as Corge<T::Quax>>::Fred: Waldo,
{
type Thud = u8;
}
pub trait Plugh<I> {
fn baz();
}
#[derive(Copy, Clone, Debug)]
pub struct Qiz<T> {
foo: T,
}
impl<T> Plugh<<() as Corge<T::Thud>>::Fred> for Qiz<T>
where
T: Grault,
(): Corge<T::Thud>,
{
fn baz() {}
}
#[cfg(test)]
mod tests {
use super::{Grault, Plugh, Qiz};
#[test]
fn test1() {
<u32 as Grault>::bar(0u32);
}
#[test]
fn test2() {
<Qiz<u32> as Plugh<u32>>::baz();
}
} |
This part seems weird. Is that normal for an ICE? |
This also ICEs with // traits and impls as before
pub fn test2() {
<Qiz<u32> as Plugh<u32>>::baz();
}
Looks like putting it in a |
Too long ago to get CI builds for individual commits, but the range where the bug was introduced is 485c5fb...94d3463. |
It's a weird ICE all around. The compiler panics on a failed It looks like the SIGILL is how On 1.46 and before only the second error happened (apparently directly thrown instead of delayed). |
Might have been caused by #70868 ? |
Ah wait no this is in |
Could be #70860, though. |
Hard to know because of this ;) |
It's not before codegen (or at least, rustc_codegen_ssa is in the backtrace so I don't think #70868 can be ruled out); the full backtrace of where the delay_span_bug happens is: Backtrace
|
@SNCPlay42 that's just because of the query system; rust doesn't have stages of compilation: https://rustc-dev-guide.rust-lang.org/overview.html#queries. But the panic is coming from |
cc @lcnr |
Assigning |
This comment has been minimized.
This comment has been minimized.
Appears to be fixed by #84472 |
Rollup of 9 pull requests Successful merges: - rust-lang#86192 (Make OR_PATTERNS_BACK_COMPAT be a 2021 future-incompatible lint) - rust-lang#86248 (Add a regression test for issue-85113) - rust-lang#86274 (Spaces) - rust-lang#86349 (Add regression test for issue rust-lang#78632) - rust-lang#86424 (rustfmt: load nested out-of-line mods correctly) - rust-lang#86472 (Fix CI to fetch master on beta channel) - rust-lang#86473 (Rustdoc: Account for const-unstable functions) - rust-lang#86495 (Improve `proc_macro::{Punct, Spacing}` documentation) - rust-lang#86503 (Fix rust.css fonts.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
To ICE, both tests must be present. Also, if the code compiles successfully, the cache is poisoned. Until
cargo clean
is run, all future runs will compile successfully, even once the offending code is reintroduced. Also, this only ICEs as a lib, not as a binary.Steps to reproduce:
cargo test
# ICEcargo test
# compilescargo test
# still compilescargo clean
cargo test
# ICEI have been unable to reduce the code further. My apologies for its length. The original was much worse.
Code
lib.rs
:Meta
rustc --version --verbose
:Error output
The text was updated successfully, but these errors were encountered: