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

Rust ICEs with chalk enabled on println! macro #57193

Closed
o01eg opened this issue Dec 29, 2018 · 2 comments
Closed

Rust ICEs with chalk enabled on println! macro #57193

o01eg opened this issue Dec 29, 2018 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@o01eg
Copy link
Contributor

o01eg commented Dec 29, 2018

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
@Centril Centril added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ chalk-integration labels Dec 29, 2018
@scalexm
Copy link
Member

scalexm commented Dec 31, 2018

rustc’s chalk code does not handle region constraints for now, so a type with any outlive requirements cannot be proved to be well-formed ATM.

Please note that the new trait solver is very WIP at the moment, the PR was merged so that we could iterate in tree towards a more feature-complete implementation.

@scalexm scalexm closed this as completed Dec 31, 2018
@scalexm scalexm reopened this Dec 31, 2018
@jonas-schievink jonas-schievink added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Aug 6, 2019
@camelid
Copy link
Member

camelid commented Jan 13, 2021

Closed by request of @jackh726.

@camelid camelid closed this as completed Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants