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

quad-ICE with impl Trait in binding #67166

Closed
rodrimati1992 opened this issue Dec 8, 2019 · 2 comments · Fixed by #69842
Closed

quad-ICE with impl Trait in binding #67166

rodrimati1992 opened this issue Dec 8, 2019 · 2 comments · Fixed by #69842
Labels
A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. F-impl_trait_in_bindings `#![feature(impl_trait_in_bindings)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@rodrimati1992
Copy link
Contributor

rodrimati1992 commented Dec 8, 2019

With this code:

#![feature(impl_trait_in_bindings)]

#[allow(dead_code)]
fn run(){
    let _foo: Box<impl Copy + '_> = Box::new(());
}

Running it in the playground (with Rust nightly 2019-12-07) it outputs these errors:

warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
 --> src/lib.rs:1:12
  |
1 | #![feature(impl_trait_in_bindings)]
  |            ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default

error: internal compiler error: `opaque_defn` is a local value
 --> src/lib.rs:4:9
  |
4 |   fn run(){
  |  _________^
5 | |     let _foo: Box<impl Copy + '_> = Box::new(());
6 | | }
  | |_^

error: internal compiler error: owner DefId(0:3 ~ playground[14f1]::run[0]) has no opaque type for DefId(0:4 ~ playground[14f1]::run[0]::{{opaque}}[0]) in its tables

error: internal compiler error: broken MIR in DefId(0:3 ~ playground[14f1]::run[0]) (Terminator { source_info: SourceInfo { span: src/lib.rs:5:37: 5:49, scope: scope[0] }, kind: _1 = const std::boxed::Box::<()>::new(move _2) -> [return: bb2, unwind: bb1] }): call dest mismatch (std::boxed::Box<impl std::marker::Copy> <- std::boxed::Box<()>): NoSolution
 --> src/lib.rs:5:46
  |
5 |     let _foo: Box<impl Copy + '_> = Box::new(());
  |                                              ^^

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:347:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.0-nightly (5c5c8eb86 2019-12-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C codegen-units=1 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: could not compile `playground`.

To learn more, run the command again with --verbose.
@matthewjasper matthewjasper added C-bug Category: This is a bug. F-impl_trait_in_bindings `#![feature(impl_trait_in_bindings)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. labels Dec 8, 2019
@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 8, 2019
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Dec 18, 2019
@Alexendoo
Copy link
Member

Fixed by #67681

@Alexendoo Alexendoo added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Feb 16, 2020
@jonas-schievink
Copy link
Contributor

That error doesn't look correct to me

Centril added a commit to Centril/rust that referenced this issue Mar 9, 2020
@bors bors closed this as completed in 7e903f8 Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. F-impl_trait_in_bindings `#![feature(impl_trait_in_bindings)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. 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