Closed
Description
Code
use std::result;
impl result {
fn into_future() -> Err {}
}
Meta
rustc --version --verbose
:
rustc 1.49.0-nightly (4f7612ac1 2020-10-31)
binary: rustc
commit-hash: 4f7612ac1499258025077f1fd05d2f429f9accfb
commit-date: 2020-10-31
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly
Error output
error[E0573]: expected type, found module `result`
--> reduced-mutant.rs:2:6
|
2 | impl result {
| ^^^^^^ help: an enum with a similar name exists: `Result`
error[E0573]: expected type, found variant `Err`
--> reduced-mutant.rs:3:25
|
3 | fn into_future() -> Err {}
| ^^^ not a type
|
thread 'rustc' panicked at 'assertion failed: !self.substitutions.is_empty()', compiler/rustc_errors/src/lib.rs:173:9
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.49.0-nightly (4f7612ac1 2020-10-31) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
error: aborting due to previous error
For more information about this error, try `rustc --explain E0573`.
Backtrace
error[E0573]: expected type, found module `result`
--> reduced-mutant.rs:2:6
|
2 | impl result {
| ^^^^^^ help: an enum with a similar name exists: `Result`
error[E0573]: expected type, found variant `Err`
--> reduced-mutant.rs:3:25
|
3 | fn into_future() -> Err {}
| ^^^ not a type
|
thread 'rustc' panicked at 'assertion failed: !self.substitutions.is_empty()', compiler/rustc_errors/src/lib.rs:173:9
stack backtrace:
0: std::panicking::begin_panic
1: <rustc_errors::emitter::EmitterWriter as rustc_errors::emitter::Emitter>::emit_diagnostic
2: rustc_errors::HandlerInner::emit_diagnostic
3: rustc_errors::diagnostic_builder::DiagnosticBuilder::emit
4: rustc_resolve::Resolver::resolve_crate
5: rustc_interface::passes::configure_and_expand_inner
6: rustc_interface::passes::configure_and_expand::{{closure}}
7: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
8: rustc_interface::passes::configure_and_expand
9: rustc_interface::queries::Queries::expansion
10: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
11: rustc_span::with_source_map
12: scoped_tls::ScopedKey<T>::set
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.49.0-nightly (4f7612ac1 2020-10-31) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
error: aborting due to previous error
For more information about this error, try `rustc --explain E0573`.
NOTE: The bug is found by our work-in-progress compiler testing tool Kira, and the test program is reduced/minimized by Perses
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.Performance or correctness regression from one stable version to another.