Skip to content
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

intern.rs:182: const qualif failed to prevent mutable references #62045

Closed
whitequark opened this issue Jun 22, 2019 · 9 comments · Fixed by #62094
Closed

intern.rs:182: const qualif failed to prevent mutable references #62045

whitequark opened this issue Jun 22, 2019 · 9 comments · Fixed by #62094
Assignees
Labels
A-const-eval Area: constant evaluation (mir interpretation) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@whitequark
Copy link
Member

whitequark commented Jun 22, 2019

The build of smoltcp on nightly started failing recently with an ICE: https://travis-ci.org/m-labs/smoltcp/jobs/549023810#L789-L804.

I suspect this might be caused by E0713, but it shouldn't be an ICE in any case.

@whitequark

This comment has been minimized.

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 22, 2019
@whitequark

This comment has been minimized.

@jonas-schievink jonas-schievink added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Jun 22, 2019
@eddyb
Copy link
Member

eddyb commented Jun 23, 2019

cc @oli-obk @RalfJung (also, such an ICE should say "const checking" or similar - we should maybe even rename the pass itself in the compiler - the "qualify" part isn't as primary for MIR as it is for the AST side).

@eddyb eddyb added the A-const-eval Area: constant evaluation (mir interpretation) label Jun 23, 2019
@whitequark

This comment has been minimized.

@whitequark
Copy link
Member Author

whitequark commented Jun 23, 2019

MCVE:

fn main() {
    assert_eq!(&mut [0; 1][..], &mut []);
}

I'm bisecting it now.

@whitequark
Copy link
Member Author

whitequark commented Jun 23, 2019

Bisected to 9cb052a / #58351. @RalfJung @oli-obk

@jonas-schievink jonas-schievink removed E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Jun 23, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Jun 23, 2019

Oh, I forgot about the ZST trickery, sorry, will have a fix tomorrow

@oli-obk oli-obk self-assigned this Jun 23, 2019
@whitequark
Copy link
Member Author

What's the ZST here? [] in &mut []?

@RalfJung
Copy link
Member

Yes. That's a &mut [0; i32] that gets unsized to &mut [].

bors added a commit that referenced this issue Jun 25, 2019
 Don't ICE on mutable zst slices

fixes #62045
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: constant evaluation (mir interpretation) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants