Closed
Description
Code
The full repository is here, on branch ice
: https://github.com/andrewhickman/rusty-git/tree/ice
I minimized the code down to one line
static REGEX: () = format!(r"{:pad$}(.*){:pad$}<{:pad$}", pad = PADDING_CHARS);
Meta
rustc --version --verbose
:
rustc 1.45.2 (d3fb005a3 2020-07-31)
binary: rustc
commit-hash: d3fb005a39e62501b8b0b356166e515ae24e2e54
commit-date: 2020-07-31
host: x86_64-pc-windows-msvc
release: 1.45.2
LLVM version: 10.0
I can also reproduce the bug on stable (1.45.2), beta (2020-07-23 6f95990) and nightly (2020-08-07 09f4c9f) versions in the playground
Error output
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src\librustc_builtin_macros\format.rs:369:76
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.45.2 (d3fb005a3 2020-07-31) running on x86_64-pc-windows-msvc
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: could not compile `rusty-git`.
To learn more, run the command again with --verbose.
Backtrace
stack backtrace:
0: 0x7ffa24de889e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5a3d35d079d525a9
1: 0x7ffa24e163bc - core::fmt::write::h85be0730687abf95
2: 0x7ffa24dda4ec - <std::io::IoSlice as core::fmt::Debug>::fmt::h5e52c4dfa40f4d90
3: 0x7ffa24dee21b - std::panicking::take_hook::h90751056b7e26ca7
4: 0x7ffa24dede68 - std::panicking::take_hook::h90751056b7e26ca7
5: 0x7ffa1c081e8a - rustc_driver::report_ice::h205eed652bfde463
6: 0x7ffa24deeaa7 - std::panicking::rust_panic_with_hook::h292b8e657da16614
7: 0x7ffa24dee5ff - rust_begin_unwind
8: 0x7ffa24e12d00 - core::panicking::panic_fmt::h28702f841940f05a
9: 0x7ffa24e12c4c - core::panicking::panic::ha33891627e0f1666
10: 0x7ffa1e371375 - <rustc_builtin_macros::deriving::generic::find_type_parameters::Visitor as rustc_ast::visit::Visitor>::visit_mac::hab0dbee5ce67f782
11: 0x7ffa1e3c9151 - <rustc_builtin_macros::format_foreign::printf::Num as core::fmt::Debug>::fmt::h27cc766b0d6416f8
12: 0x7ffa1e3c482d - <rustc_builtin_macros::format_foreign::printf::Num as core::fmt::Debug>::fmt::h27cc766b0d6416f8
13: 0x7ffa1e38097c - <rustc_builtin_macros::deriving::generic::find_type_parameters::Visitor as rustc_ast::visit::Visitor>::visit_mac::hab0dbee5ce67f782
14: 0x7ffa1f3dc82b - rustc_expand::expand::MacroExpander::fully_expand_fragment::hb75febf9ffebd59c
15: 0x7ffa1f3db191 - rustc_expand::expand::MacroExpander::expand_crate::heedeb684ea6c8395
16: 0x7ffa1c1d3f27 - <<serde::de::impls::range::Field as serde::de::Deserialize>::deserialize::FieldVisitor as serde::de::Visitor>::expecting::h34013356ca70ebb0
17: 0x7ffa1c24d22f - rustc_interface::passes::BoxedResolver::to_resolver_outputs::h071f543b3f8e8576
18: 0x7ffa1c1e42ac - <<serde::de::impls::range::Field as serde::de::Deserialize>::deserialize::FieldVisitor as serde::de::Visitor>::expecting::h34013356ca70ebb0
19: 0x7ffa1c1d5ff6 - <<serde::de::impls::range::Field as serde::de::Deserialize>::deserialize::FieldVisitor as serde::de::Visitor>::expecting::h34013356ca70ebb0
20: 0x7ffa1c24bef4 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile::h9cc3880447401cd2
21: 0x7ffa1c2154b8 - rustc_interface::queries::Queries::expansion::h83bb5b985eb35a30
22: 0x7ffa1c04868f - <rustc_typeck::coherence::unsafety::UnsafetyChecker as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_impl_item::h9fa5ae9e085bfbd8
23: 0x7ffa1c09bb8e - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::h308f39c80603f7ee
24: 0x7ffa1c0981f9 - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::h308f39c80603f7ee
25: 0x7ffa1c09ede9 - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::h308f39c80603f7ee
26: 0x7ffa1c04cb93 - <rustc_mir::dataflow::framework::direction::Backward as rustc_mir::dataflow::framework::direction::Direction>::is_forward::h989a918c4093af52
27: 0x7ffa24dfe33a - std::sys::windows::thread::Thread::new::he9d4c6ed5e9fd093
28: 0x7ffa9e407bd4 - BaseThreadInitThunk
29: 0x7ffa9fc2ce51 - RtlUserThreadStart