Skip to content

ICE on malformed function signature (ident only path) #22861

Closed
@nwin

Description

@nwin

This minimal example lets the compiler crash:

fn bug(Type<T>, arg: Type);

this doesn’t happen with the following code:

fn bug(Type, arg: Type);

trace:

test.rs:1:8: 1:12 error: internal compiler error: ident only path should have been covered already
test.rs:1 fn bug(Type<T>, arg: Type);
                 ^~~~
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>', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libsyntax/diagnostic.rs:129

stack backtrace:
   1:        0x112422be3 - sys::backtrace::write::hc8e3cee73e646c590nC
   2:        0x112450be5 - panicking::on_panic::h00b47941f5bc8a02HOL
   3:        0x11237a418 - rt::unwind::begin_unwind_inner::h539538ef7f909326UvL
   4:        0x111a38dcf - rt::unwind::begin_unwind::h17340398235865146743
   5:        0x111a38d7c - diagnostic::SpanHandler::span_bug::hef0e2599b36810bavYE
   6:        0x111a61b15 - parse::parser::Parser<'a>::parse_pat::hb3cc0e8f43f24f14wLL
   7:        0x111a56394 - parse::parser::Parser<'a>::parse_arg_general::h5a55ff7b6be1da0384J
   8:        0x111a831c9 - parse::parser::Parser<'a>::parse_seq_to_before_end::h11152631335872661402
   9:        0x111a550a8 - parse::parser::Parser<'a>::parse_fn_args::hd367de6c06911261yAM
  10:        0x111a8370d - parse::parser::Parser<'a>::parse_fn_decl::h44625901138eaf553CM
  11:        0x111a83cd2 - parse::parser::Parser<'a>::parse_item_fn::h76bb729755ce656afVM
  12:        0x111a79e9a - parse::parser::Parser<'a>::parse_item_::hc402e07115996d8fzUN
  13:        0x111a8a751 - parse::parser::Parser<'a>::parse_mod_items::h12f6ab79c6414614PjN
  14:        0x111a963b3 - parse::parser::Parser<'a>::parse_crate_mod::h66d7caf303a06621FlO
  15:        0x111aaae53 - parse::parse_crate_from_file::hd404c1ea18c1aca1vNV
  16:        0x10e745f66 - driver::phase_1_parse_input::closure.16950
  17:        0x10e71ff13 - driver::phase_1_parse_input::hc6f9fc404efb7c29Qra
  18:        0x10e71cb79 - driver::compile_input::h349b039ebe75c13eGba
  19:        0x10e7f6857 - run_compiler::h1e4d87c6044fbf6dZbc
  20:        0x10e7f3cd1 - thunk::F.Invoke<A, R>::invoke::h2059937391804860278
  21:        0x10e7f2930 - rt::unwind::try::try_fn::h11862807381821880905
  22:        0x1124ca7e9 - rust_try_inner
  23:        0x1124ca7d6 - rust_try
  24:        0x10e7f3095 - thunk::F.Invoke<A, R>::invoke::h6573516661401600357
  25:        0x112439ac3 - sys::thread::thread_start::h9e3555425c6999b2e4G
  26:     0x7fff962fe268 - _pthread_body
  27:     0x7fff962fe1e5 - _pthread_body

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions