Closed
Description
Hi everyone,
I accidentally mistyped on a german keyboard and entered an additional ö-character after a Vec-declaration. This apparently causes an internal compiler error.
I tried this code:
pub struct TestStruct{
pub test: Vec<int>ö
}
fn main() {
println!("Hello, world!");
}
and ran cargo build.
I expected to see this happen:
Compiler complains about an extra character at the end of the definition
Instead, this happened:
> cargo build
Compiling umlaut v0.1.0 (C:\Users\vbuck\Desktop\umlaut)
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: IllFormedSpan(Span { lo: BytePos(45), hi: BytePos(46), ctxt: #0 })', src\libcore\result.rs:1192:5
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.42.0-nightly (859764425 2020-01-07) running on x86_64-pc-windows-msvc
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: could not compile `umlaut`.
To learn more, run the command again with --verbose.
Meta
rustc --version --verbose
:
> rustc --version --verbose
rustc 1.42.0-nightly (859764425 2020-01-07)
binary: rustc
commit-hash: 85976442558bf2d09cec3aa49c9c9ba86fb15c1f
commit-date: 2020-01-07
host: x86_64-pc-windows-msvc
release: 1.42.0-nightly
LLVM version: 9.0
Backtrace:
> $Env:RUST_BACKTRACE=1
PS C:\Users\vbuck\Desktop\umlaut> cargo build --verbose
Compiling umlaut v0.1.0 (C:\Users\vbuck\Desktop\umlaut)
Running `rustc --crate-name umlaut --edition=2018 'src\main.rs' --error-format=json --json=diagnostic-rendered-ansi
--crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=d3bb206b8e2e3b83 --out-dir 'C:\Users\vbuck\Desktop\umlaut\target\debug\deps' -C 'incremental=C:\Users\vbuck\Desktop\umlaut\target\debug\incremental' -L 'dependency=C:\Users\vbuck\Desktop\umlaut\target\debug\deps'`
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: IllFormedSpan(Span { lo: BytePos(45), hi: BytePos(46), ctxt: #0 })', src\libcore\result.rs:1192:5
stack backtrace:
0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: <std::io::IoSlice as core::fmt::Debug>::fmt
3: std::panicking::take_hook
4: std::panicking::take_hook
5: rustc_driver::report_ice
6: std::panicking::rust_panic_with_hook
7: rust_begin_unwind
8: core::panicking::panic_fmt
9: core::result::unwrap_failed
10: rustc_errors::emitter::is_case_difference
11: rustc_errors::emitter::HumanReadableErrorType::new_emitter
12: <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit_diagnostic
13: <rustc_errors::json::JsonEmitter as rustc_errors::emitter::Emitter>::emit_diagnostic
14: rustc_errors::HandlerInner::emit_diagnostic
15: rustc_errors::diagnostic_builder::DiagnosticBuilder::emit
16: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_foreign_item
17: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item
18: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item
19: rustc_parse::parser::item::<impl rustc_parse::parser::Parser>::parse_item
20: rustc_parse::parser::module::<impl rustc_parse::parser::Parser>::parse_crate_mod
21: rustc_parse::parser::module::<impl rustc_parse::parser::Parser>::parse_crate_mod
22: rustc_parse::parse_crate_from_file
23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::compile
24: rustc_interface::callbacks::setup_callbacks
25: rustc_interface::queries::Queries::parse
26: rustc_driver::pretty::print_after_hir_lowering
27: <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt
28: <rustc_driver::Compilation as core::fmt::Debug>::fmt
29: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
30: _rust_maybe_catch_panic
31: rustc_driver::pretty::print_after_hir_lowering
32: ZN244_$LT$std..error..$LT$impl$u20$core..convert..From$LT$alloc..string..String$GT$$u20$for$u20$alloc..boxed..Box$LT$dyn$u20$std..error..Error$u2b$core..marker..Send$u2b$core..marker..Sync$GT$$GT$..from..StringError$u20$as$u20$core..fmt..Display$GT$3fmt17
33: std::sys::windows::thread::Thread::new
34: BaseThreadInitThunk
35: RtlUserThreadStart
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 (859764425 2020-01-07) running on x86_64-pc-windows-msvc
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `umlaut`.
Caused by:
process didn't exit successfully: `rustc --crate-name umlaut --edition=2018 'src\main.rs' --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=d3bb206b8e2e3b83 --out-dir 'C:\Users\vbuck\Desktop\umlaut\target\debug\deps' -C 'incremental=C:\Users\vbuck\Desktop\umlaut\target\debug\incremental' -L 'dependency=C:\Users\vbuck\Desktop\umlaut\target\debug\deps'` (exit code: 101)
Metadata
Metadata
Assignees
Labels
Area: UnicodeArea: The lexing & parsing of Rust source code to an ASTCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️High priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.