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 with pub type with direct use of default type parameter #14933

Closed
libfud opened this issue Jun 16, 2014 · 1 comment
Closed

ICE with pub type with direct use of default type parameter #14933

libfud opened this issue Jun 16, 2014 · 1 comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@libfud
Copy link

libfud commented Jun 16, 2014

Changing the line

type Bigrat<T= BigRational> = T;

to

pub type BigRat<T = BigRational> = T;

causes the compiler to fail with the following backtrace:

error: internal compiler error: found unmapped ID in worklist: 4791
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/buil
d/src/libsyntax/diagnostic.rs:162                                                           

stack backtrace:
   1:     0x7f976c495900 - rt::backtrace::imp::write::he132d79389e358c8AGp::v0.11.0.pre
   2:     0x7f976c49d030 - failure::on_fail::h5cc622b2b6de7c92N1p::v0.11.0.pre
   3:     0x7f976c8b7410 - unwind::begin_unwind_inner::hfdc3321d430c4be5QRd::v0.11.0.pre
   4:     0x7f976b34a430 - unwind::begin_unwind::h15411178358729660202::v0.11.0.pre
   5:     0x7f976b34ae70 - diagnostic::Handler::bug::h3a98fff19f29d074Y3b::v0.11.0.pre
   6:     0x7f976cf0c9d0 - driver::session::Session::bug::h5fe77e17d8bc65ccrlw::v0.11.0.pre
   7:     0x7f976d6bd3a0 - middle::reachable::find_reachable::h816b66fbd6806c79nO4::v0.11.0.p
re                                                                                          
   8:     0x7f976d83e270 - driver::driver::phase_3_run_analysis_passes::hcb3b633763f249271mv:
:v0.11.0.pre                                                                                
   9:     0x7f976d8367e0 - driver::driver::compile_input::h86d461aeb26e888dgbv::v0.11.0.pre
  10:     0x7f976d901290 - driver::run_compiler::h3debb6db2f3b527cOSx::v0.11.0.pre
  11:     0x7f976d9011a0 - driver::main_args::closure.98525
  12:     0x7f976d91cd00 - driver::monitor::closure.99615
  13:     0x7f976d917c40 - task::TaskBuilder::try::closure.99378
  14:     0x7f976f9702a0 - task::spawn_opts::closure.7148
  15:     0x7f976c8b3fc0 - task::Task::run::closure.5303
  16:     0x7f976c91ea20 - rust_try
  17:     0x7f976c8b6a00 - unwind::try::heae236e404445881fGd::v0.11.0.pre
  18:     0x7f976c8b3e40 - task::Task::run::h1536f4cce70d9777VVc::v0.11.0.pre
  19:     0x7f976f970040 - task::spawn_opts::closure.7121
  20:     0x7f976c8b5fd0 - thread::thread_start::h2c9b863e7dad2f1ekdd::v0.11.0.pre
  21:       0x3832407e70 - start_thread
  22:       0x3831cf4db9 - clone
  23:                0x0 - <unknown>
@huonw
Copy link
Member

huonw commented Jun 16, 2014

Minimal example:

#![feature(default_type_params)]

pub type X<T = int> = T;

fn main() {}

It doesn't ICE with pub type X<T = int> = Option<T>;.

@huonw huonw added the I-ICE label Jun 16, 2014
@huonw huonw changed the title ICE with pub type with default type parameter ICE with pub type with direct use of default type parameter Jun 16, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jun 16, 2014
This ends up causing the privacy pass to get all confused, and there's nothing
inherently exported about them anyway.

Closes rust-lang#14933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants