Closed
Description
Cargo.toml
:
[package]
name = "rust-async-ice"
edition = "2018"
version = "0.1.0"
authors = ["Pauan <[email protected]>"]
[dependencies]
foo = "0.0.0"
main.rs
:
#![feature(async_await, await_macro, futures_api)]
extern crate foo;
// The Bar type doesn't exist in foo
use foo::Bar;
async fn future_main() -> Result<(), Bar> {
Ok(())
}
fn main() {}
When running cargo build --verbose
I get this ICE:
> cargo build --verbose
Compiling foo v0.0.0
Running `rustc --crate-name foo C:\Users\Pauan\.cargo\registry\src\github.colasdn.workers.dev-1ecc6299db9ec823\foo-0.0.0\src\lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=b5174b0adc406c09 -C extra-filename=-b5174b0adc406c09 --out-dir "C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps" -L "dependency=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps" --cap-lints allow`
Compiling rust-async-ice v0.1.0 (C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice)
Running `rustc --edition=2018 --crate-name rust_async_ice src\main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=48b1954b9da344d9 -C extra-filename=-48b1954b9da344d9 --out-dir "C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps" -C "incremental=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\incremental" -L "dependency=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps" --extern "foo=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps\libfoo-b5174b0adc406c09.rlib"`
error: internal compiler error: cat_expr Errd
--> src\main.rs:8:43
|
8 | async fn future_main() -> Result<(), Bar> {
| ___________________________________________^
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: cat_expr Errd
--> src\main.rs:8:43
|
8 | async fn future_main() -> Result<(), Bar> {
| ___________________________________________^
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: cat_expr Errd
--> src\main.rs:9:5
|
9 | Ok(())
| ^^^^^^
error: internal compiler error: cat_expr Errd
--> src\main.rs:9:5
|
9 | Ok(())
| ^^
error: internal compiler error: QualifyAndPromoteConstants: Mir had errors
--> src\main.rs:8:43
|
8 | async fn future_main() -> Result<(), Bar> {
| ___________________________________________^
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: broken MIR in DefId(0/1:10 ~ rust_async_ice[6258]::future_main[0]::{{closure}}[0]) ("return type"): bad type std::result::Result<(), [type error]>
--> src\main.rs:8:43
|
8 | async fn future_main() -> Result<(), Bar> {
| ___________________________________________^
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: broken MIR in DefId(0/1:10 ~ rust_async_ice[6258]::future_main[0]::{{closure}}[0]) (LocalDecl { mutability: Mut, is_user_variable: None, internal: false, ty: std::result::Result<(), [type error]>, user_ty: None, name: None, source_info: SourceInfo { span: src\main.rs:8:43: 10:2, scope: scope[0] }, visibility_scope: scope[0] }): bad type std::result::Result<(), [type error]>
--> src\main.rs:8:43
|
8 | async fn future_main() -> Result<(), Bar> {
| ___________________________________________^
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: broken MIR in DefId(0/1:10 ~ rust_async_ice[6258]::future_main[0]::{{closure}}[0]) (LocalDecl { mutability: Mut, is_user_variable: None, internal: false, ty: [static generator@src\main.rs:8:43: 10:2 {}], user_ty: None, name: None, source_info: SourceInfo { span: src\main.rs:8:43: 10:2, scope: scope[0] }, visibility_scope: scope[0] }): bad type [static generator@src\main.rs:8:43: 10:2 {}]
--> src\main.rs:8:43
|
8 | async fn future_main() -> Result<(), Bar> {
| ___________________________________________^
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: QualifyAndPromoteConstants: Mir had errors
--> src\main.rs:8:1
|
8 | / async fn future_main() -> Result<(), Bar> {
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: broken MIR in DefId(0/0:5 ~ rust_async_ice[6258]::future_main[0]) ("return type"): bad type impl std::future::Future
--> src\main.rs:8:1
|
8 | / async fn future_main() -> Result<(), Bar> {
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: broken MIR in DefId(0/0:5 ~ rust_async_ice[6258]::future_main[0]) (LocalDecl { mutability: Mut, is_user_variable: None, internal: false, ty: impl std::future::Future, user_ty: None, name: None, source_info: SourceInfo { span: src\main.rs:8:1: 10:2, scope: scope[0] }, visibility_scope: scope[0] }): bad type impl std::future::Future
--> src\main.rs:8:1
|
8 | / async fn future_main() -> Result<(), Bar> {
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: broken MIR in DefId(0/0:5 ~ rust_async_ice[6258]::future_main[0]) (LocalDecl { mutability: Mut, is_user_variable: None, internal: false, ty: [static generator@src\main.rs:8:43: 10:2 {}], user_ty: None, name: None, source_info: SourceInfo { span: src\main.rs:8:43: 10:2, scope: scope[0] }, visibility_scope: scope[0] }): bad type [static generator@src\main.rs:8:43: 10:2 {}]
--> src\main.rs:8:1
|
8 | / async fn future_main() -> Result<(), Bar> {
9 | | Ok(())
10 | | }
| |_^
error: internal compiler error: errors selecting obligation during MIR typeck: [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<impl std::future::Future as std::marker::Sized>)),depth=0),Ambiguity), FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<impl std::future::Future as std::future::Future>)),depth=0),Ambiguity)]
thread 'main' panicked at 'no errors encountered even though `delay_span_bug` issued', librustc_errors\lib.rs:321:17
stack backtrace:
0: 0x7ffa7b0e0a92 - <std::sys::windows::args::Args as core::ops::drop::Drop>::drop::h69dc4a396c83fbea
1: 0x7ffa7b0c9f2f - std::io::error::Error::get_ref::h3b34149d3fcc474b
2: 0x7ffa7b0c8348 - std::panicking::take_hook::h45b4c991720c128b
3: 0x7ffa7b0c8001 - std::panicking::take_hook::h45b4c991720c128b
4: 0x7ffa5b885175 - <rustc::ty::sty::Binder<rustc::ty::ProjectionPredicate<'tcx>> as rustc::ty::ToPredicate<'tcx>>::to_predicate::h2e6434fb2079e88c
5: 0x7ffa7b0c8b71 - std::panicking::rust_panic_with_hook::h1ea4d5bad9b899f1
6: 0x7ffa78e69067 - <rustc_errors::diagnostic::SubDiagnostic as core::fmt::Debug>::fmt::hbf1fd867e36c5c5b
7: 0x7ffa78e62ae1 - <rustc_errors::Handler as core::ops::drop::Drop>::drop::ha7e5ef5f688ed509
8: 0x7ffa881adc0c - rustc_driver::target_features::add_configuration::h7dfe8e915c1650c9
9: 0x7ffa881b424f - rustc_driver::target_features::add_configuration::h7dfe8e915c1650c9
10: 0x7ffa881b9acf - rustc_driver::target_features::add_configuration::h7dfe8e915c1650c9
11: 0x7ffa881bc426 - rustc_driver::target_features::add_configuration::h7dfe8e915c1650c9
12: 0x7ffa7b0fa471 - _rust_maybe_catch_panic
13: 0x7ffa882542b2 - rustc_driver::profile::dump::had22fd3d322ef3c6
14: 0x7ffa88266a7d - rustc_driver::main::h5823241893b36e24
15: 0x7ff6834d1055 - <unknown>
16: 0x7ffa7b0c8516 - std::panicking::update_panic_count::h2bc483fd32260cb4
17: 0x7ffa7b0fa471 - _rust_maybe_catch_panic
18: 0x7ffa7b0da342 - std::rt::lang_start_internal::hf2484ca2ac9591b0
19: 0x7ff6834d1049 - <unknown>
20: 0x7ff6834d1298 - <unknown>
21: 0x7ffac2fd3033 - BaseThreadInitThunk
22: 0x7ffac3431460 - RtlUserThreadStart
query stack during panic:
end of query stack
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.30.0-nightly (2ab3eba30 2018-09-14) 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 `rust-async-ice`.
Caused by:
process didn't exit successfully: `rustc --edition=2018 --crate-name rust_async_ice src\main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=48b1954b9da344d9 -C extra-filename=-48b1954b9da344d9 --out-dir "C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps" -C "incremental=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\incremental" -L "dependency=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps" --extern "foo=C:\Users\Pauan\Shared Folders\NixOS\rust-async-ice\target\debug\deps\libfoo-b5174b0adc406c09.rlib"` (exit code: 101)
Meta
rustc --version --verbose
:
rustc 1.30.0-nightly (2ab3eba30 2018-09-14)
binary: rustc
commit-hash: 2ab3eba30741652ba538bc2fc2bba9d81a5c84c6
commit-date: 2018-09-14
host: x86_64-pc-windows-msvc
release: 1.30.0-nightly
LLVM version: 8.0