Closed
Description
Code
// mod structs;
// mod table;
use std::env;
type Result<T, E = impl std::error::Error> = std::result::Result<T, E>;
fn main() -> Result<()> {
let args: Vec<String> = env::args().collect();
println!("{:?}", args.get(0));
Ok(())
}
Meta
rustc --version --verbose
:
rustc 1.53.0-nightly (673d0db5e 2021-03-23)
binary: rustc
commit-hash: 673d0db5e393e9c64897005b470bfeb6d5aec61b
commit-date: 2021-03-23
host: x86_64-apple-darwin
release: 1.53.0-nightly
LLVM version: 12.0.0
Error output
error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:529:17: type parameter `E/#1` (E/1) out of range when substituting, substs=[()]
--> src/main.rs:8:14
|
8 | fn main() -> Result<()> {
| ^^^^^^^^^^
thread 'rustc' panicked at 'Box<Any>', /rustc/673d0db5e393e9c64897005b470bfeb6d5aec61b/library/std/src/panic.rs:59:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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.53.0-nightly (673d0db5e 2021-03-23) running on x86_64-apple-darwin
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [fn_sig] computing function signature of `main`
#1 [collect_mod_item_types] collecting item types in top-level module
end of query stack
error: aborting due to previous error
error: could not compile `project`
Backtrace
<backtrace>