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

ICE: bad_placeholder_type #74612

Closed
Bryysen opened this issue Jul 22, 2020 · 2 comments · Fixed by #74618
Closed

ICE: bad_placeholder_type #74612

Bryysen opened this issue Jul 22, 2020 · 2 comments · Fixed by #74618
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Bryysen
Copy link
Contributor

Bryysen commented Jul 22, 2020

First time filing a bug report, apologies if i missed anything or if this is a duplicate. Encountered this bug while writing some non-sensical associated function types. Searched around for any similar issues and the closest i found was #70291, seems closely related?

Minimal example:

pub trait MyTrait {
    type AssocFn: std::ops::Fn(_);
}

fn main() {}

Playground link:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=02cf6fb6aed04c3058b258f5f41200d2

The ICE happens on all channels it seems

Backtrace

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:366:17
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:490
  12: std::panicking::begin_panic
  13: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
  14: core::ptr::drop_in_place
  15: <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop
  16: core::ptr::drop_in_place
  17: rustc_interface::interface::run_compiler_in_existing_thread_pool
  18: rustc_ast::attr::with_globals

note: rustc 1.45.0 (5c1f21c3b 2020-07-13) running on x86_64-unknown-linux-gnu
note: compiler flags: -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 --crate-type bin
@Bryysen Bryysen added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 22, 2020
@JohnTitor
Copy link
Member

Searched around for any similar issues and the closest i found was #70291, seems closely related?

Yes, I think so too.
The snippet is rejected as expected on 1.42 but ICE occurs instead since 1.43.

@JohnTitor JohnTitor self-assigned this Jul 22, 2020
@JohnTitor JohnTitor added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Jul 22, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Jul 22, 2020
@spastorino
Copy link
Member

Assigning P-medium as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@spastorino spastorino added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jul 22, 2020
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 22, 2020
…r=estebank

Do not ICE on assoc type with bad placeholder

Fixes rust-lang#74612
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 22, 2020
…r=estebank

Do not ICE on assoc type with bad placeholder

Fixes rust-lang#74612
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 22, 2020
…r=estebank

Do not ICE on assoc type with bad placeholder

Fixes rust-lang#74612
r? @estebank
Manishearth added a commit to Manishearth/rust that referenced this issue Jul 22, 2020
…r=estebank

Do not ICE on assoc type with bad placeholder

Fixes rust-lang#74612
r? @estebank
@bors bors closed this as completed in 9ac2af1 Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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.

4 participants