Skip to content

ice on glacier 26459.rs with -Zsave-analysis #68749

Closed
@matthiaskrgr

Description

@matthiaskrgr
fn main() {
    match 'a' {
        char{ch} => true
    }
}

rustc 26459.rs -Zsave-analysis

error[E0574]: expected struct, variant or union type, found builtin type `char`
 --> 26459.rs:3:9
  |
3 |         char{ch} => true
  |         ^^^^ not a struct, variant or union type

error[E0308]: mismatched types
 --> 26459.rs:3:21
  |
1 | fn main() {
  |           - expected `()` because of default return type
2 |     match 'a' {
3 |         char{ch} => true
  |                     ^^^^- help: try adding a semicolon: `;`
  |                     |
  |                     expected `()`, found `bool`

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/librustc_save_analysis/dump_visitor.rs:870:33
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   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:1052
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1428
   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:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:476
  12: rust_begin_unwind
             at src/libstd/panicking.rs:380
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  14: core::panicking::panic
             at src/libcore/panicking.rs:52
  15: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_pat
  16: rustc_save_analysis::dump_visitor::DumpVisitor::process_var_decl
  17: syntax::visit::walk_expr
  18: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  19: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod
  20: rustc::dep_graph::graph::DepGraph::with_ignore
  21: rustc_session::utils::<impl rustc_session::session::Session>::time
  22: rustc::ty::context::tls::enter_global
  23: rustc_interface::interface::run_compiler_in_existing_thread_pool
  24: scoped_tls::ScopedKey<T>::set
  25: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.42.0-nightly (cd1ef390e 2020-01-31) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z save-analysis

query stack during panic:
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0308, E0574.
For more information about an error, try `rustc --explain E0308`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions