Skip to content

My compiler told me: Thread 'rustc' panicked at 'Box<Any>' #23215

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

Closed
contradictioned opened this issue Mar 9, 2015 · 1 comment
Closed

My compiler told me: Thread 'rustc' panicked at 'Box<Any>' #23215

contradictioned opened this issue Mar 9, 2015 · 1 comment

Comments

@contradictioned
Copy link
Contributor

I tried this code:

struct ostage<'a> {
  nodes: Vec<Node<'a>>
}


impl<'a> ostage<'a> {
    fn append_nodes(&self, Vec<Node>) {
        self.nodes.append(&mut new_nodes);
    }
}

(definition of Node ommitted, the bug already occurs in this short snippet)

I expected to see this happen: The compiler should complain about the not existent naming of the second parameter of append_nodes.

Instead, this happened: Compiler said:

bug_example.rs:7:28: 7:31 error: internal compiler error: ident only path should have been covered already
bug_example.rs:7     fn append_nodes(&self, Vec<Node>) {
                                            ^~~
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129

Meta

rustc --version --verbose:

  • 1.0.0-nightly (522d09d 2015-02-19) (built 2015-02-21)
  • binary: rustc
  • commit-hash: 522d09d
  • commit-date: 2015-02-19
  • build-date: 2015-02-21
  • host: x86_64-unknown-linux-gnu
  • release: 1.0.0-nightly

Backtrace:

 1:     0x7fbbc5e7b210 - sys::backtrace::write::h252031bd050bf19aKlC
 2:     0x7fbbc5ea3ac0 - panicking::on_panic::h8a07e978260e2c7btXL
 3:     0x7fbbc5de4720 - rt::unwind::begin_unwind_inner::h322bcb3f35268c19RBL
 4:     0x7fbbc30d2aa0 - rt::unwind::begin_unwind::h14707831790480024292
 5:     0x7fbbc30d2a30 - diagnostic::SpanHandler::span_bug::hc8a5aaa027e1ffe4vYE
 6:     0x7fbbc30f5440 - parse::parser::Parser<'a>::parse_pat::hb2ecf80c7f350654wLL
 7:     0x7fbbc30ede80 - parse::parser::Parser<'a>::parse_arg_general::hcec437b628467db684J
 8:     0x7fbbc311c860 - parse::parser::Parser<'a>::parse_seq_to_before_end::h6260280699255559793
 9:     0x7fbbc3119b30 - parse::parser::Parser<'a>::parse_method::h0d3e8afbedb80840ZWM
10:     0x7fbbc311d5c0 - parse::parser::Parser<'a>::parse_item_impl::hd52de03300e36175z4M
11:     0x7fbbc310e370 - parse::parser::Parser<'a>::parse_item_::h60b4bcefd23d6140zUN
12:     0x7fbbc311f8e0 - parse::parser::Parser<'a>::parse_mod_items::h79ee3c5e427ceaaaPjN
13:     0x7fbbc312ae30 - parse::parser::Parser<'a>::parse_crate_mod::h221baa0e96bbcf97FlO
14:     0x7fbbc313dcf0 - parse::parse_crate_from_file::h14706417f2de711evNV
15:     0x7fbbc6505340 - driver::phase_1_parse_input::closure.16948
16:     0x7fbbc64df670 - driver::phase_1_parse_input::ha93ec06764e22311Qra
17:     0x7fbbc64dc070 - driver::compile_input::h0c8d8120f6194473Gba
18:     0x7fbbc65ab2b0 - run_compiler::heccd2f43b844857cZbc
19:     0x7fbbc65a9bb0 - thunk::F.Invoke<A, R>::invoke::h14556331494175157254
20:     0x7fbbc65a8aa0 - rt::unwind::try::try_fn::h8181016918202193540
21:     0x7fbbc5f10880 - rust_try_inner
22:     0x7fbbc5f10870 - rust_try
23:     0x7fbbc65a8da0 - thunk::F.Invoke<A, R>::invoke::h12418455792421810631
24:     0x7fbbc5e8fb60 - sys::thread::thread_start::h3defdaea150d8cd693G
25:     0x7fbbbfd912b0 - start_thread
26:     0x7fbbc5a6d249 - __clone
27:                0x0 - <unknown>
@jdm
Copy link
Contributor

jdm commented Mar 9, 2015

Duplicate of #23044. The parser doesn't like finding patterns with type parameters where names are expected.

@jdm jdm closed this as completed Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants