-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-impl_trait_in_bindings`#![feature(impl_trait_in_bindings)]``#![feature(impl_trait_in_bindings)]`F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`F-unboxed_closures`#![feature(unboxed_closures)]``#![feature(unboxed_closures)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
Originally found in #85883 by @Boddlnagg. At first I thought this was #85113, but it turned out to be something else, so as @JohnTitor requested, I'm opening a new issue for it, since it didn't seem like one already existed for it.
Code
#![feature(unboxed_closures)]
#![feature(min_type_alias_impl_trait)]
#![feature(impl_trait_in_bindings)]
type FunType = impl Fn<()>;
static STATIC_FN: FunType = some_fn;
fn some_fn() {}
fn main() {
let _: <FunType as FnOnce<()>>::Output = STATIC_FN();
}
Meta
rustc --version --verbose
:
rustc 1.54.0-nightly (eab201df7 2021-06-09)
binary: rustc
commit-hash: eab201df7028ebb6812c0b1a01702ac6ecfcceed
commit-date: 2021-06-09
host: x86_64-unknown-linux-gnu
release: 1.54.0-nightly
LLVM version: 12.0.1
Error output
error: internal compiler error: broken MIR in DefId(0:7 ~ tmp[8939]::main) (NoSolution): failed to normalize `<_ as std::ops::FnOnce<()>>::Output`
|
= note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:253:27
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1023:13
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.54.0-nightly (eab201df7 2021-06-09) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
Backtrace
0: rust_begin_unwind
at /rustc/eab201df7028ebb6812c0b1a01702ac6ecfcceed/library/std/src/panicking.rs:515:5
1: std::panicking::begin_panic_fmt
at /rustc/eab201df7028ebb6812c0b1a01702ac6ecfcceed/library/std/src/panicking.rs:457:5
2: rustc_errors::HandlerInner::flush_delayed
3: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
4: core::ptr::drop_in_place<rustc_session::parse::ParseSess>
5: <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop
6: core::ptr::drop_in_place<rustc_interface::interface::Compiler>
7: rustc_span::with_source_map
8: rustc_interface::interface::create_compiler_and_run
9: rustc_span::with_session_globals
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-impl_trait_in_bindings`#![feature(impl_trait_in_bindings)]``#![feature(impl_trait_in_bindings)]`F-type_alias_impl_trait`#[feature(type_alias_impl_trait)]``#[feature(type_alias_impl_trait)]`F-unboxed_closures`#![feature(unboxed_closures)]``#![feature(unboxed_closures)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Type
Projects
Status
Done