Skip to content

Rust ICEs with chalk enabled on println! macro #57193

Closed
@o01eg

Description

@o01eg

After #56384 was merged I get error:

$ RUST_BACKTRACE=1 rustc -Z external-macro-backtrace -Z chalk src/main.rs 
error: the type `std::fmt::Arguments<'_>` is not well-formed (chalk)
 --> <::std::macros::println macros>:2:29
  |
1 | / (  ) => ( print ! ( "\n" ) ) ; ( $ ( $ arg : tt ) * ) => (
2 | | { $ crate :: io :: _print ( format_args_nl ! ( $ ( $ arg ) * ) ) ; } )
  | |_____________________________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^_______- in this expansion of `println!`
  | 
 ::: src/main.rs:2:5
  |
2 |       println!("Hello, world!");
  |       -------------------------- in this macro invocation

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21
stack backtrace:
   0: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
   1: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
   2: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
   3: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
   4: rust_metadata_rustc_93446a3d05b17aa7669034db402968cd
   5: std::panicking::rust_panic_with_hook
   6: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic
  10: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::report_selection_error
  11: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::report_fulfillment_errors
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: <unknown>
  36: <unknown>
  37: <unknown>
  38: rust_metadata_rustc_93446a3d05b17aa7669034db402968cd
  39: <unknown>
  40: rust_metadata_rustc_93446a3d05b17aa7669034db402968cd
  41: rust_metadata_rustc_93446a3d05b17aa7669034db402968cd
  42: rust_metadata_rustc_93446a3d05b17aa7669034db402968cd
  43: rust_metadata_rustc_93446a3d05b17aa7669034db402968cd
  44: rust_metadata_rustc_typeck_e6922b32ebf0dd27d16c8cd57d005acb
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: rust_metadata_rustc_typeck_e6922b32ebf0dd27d16c8cd57d005acb
  49: <unknown>
  50: <unknown>
  51: <unknown>
  52: rustc_typeck::check_crate
  53: <unknown>
  54: <unknown>
  55: rustc_driver::driver::compile_input
  56: <unknown>
  57: <unknown>
  58: rustc_driver::run_compiler
  59: <unknown>
  60: <unknown>
  61: __rust_maybe_catch_panic
  62: <unknown>
  63: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
  64: rust_metadata_std_c1482be2cde638e9f45fe0b38fbd40fe
  65: <unknown>
  66: clone
query stack during panic:
#0 [typeck_tables_of] processing `main`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: aborting due to previous error


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.33.0-dev (d9e3edb74 2018-12-28) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z external-macro-backtrace -Z chalk

Metadata

Metadata

Assignees

No one assigned

    Labels

    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