rustc 1.50.0-nightly (1c389ffef 2020-11-24)
binary: rustc
commit-hash: 1c389ffeff814726dec325f0f2b0c99107df2673
commit-date: 2020-11-24
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> src/main.rs:1:12
|
1 | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
= help: consider using `min_const_generics` instead, which is more stable and complete
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
--> src/main.rs:2:12
|
2 | #![feature(generic_associated_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
warning: Error finalizing incremental compilation session directory `/home/cynecx/dev/rust-ice/target/debug/incremental/rust_ice-2od6n63huil2c/s-ftn1ij8uum-1wj4523-working`: No such file or directory (os error 2)
warning: 3 warnings emitted
error: internal compiler error: unexpected const parent path Ty(Ty { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 7 }, kind: Path(TypeRelative(Ty { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 9 }, kind: Path(Resolved(None, Path { span: src/main.rs:7:38: 7:50 (#0), res: SelfTy(Some(DefId(0:3 ~ rust_ice[b006]::A)), None), segments: [PathSegment { ident: Self#0, hir_id: Some(HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 8 }), res: Some(SelfTy(Some(DefId(0:3 ~ rust_ice[b006]::A)), None)), args: None, infer_args: false }] })), span: src/main.rs:7:38: 7:50 (#0) }, PathSegment { ident: B#0, hir_id: Some(HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 15 }), res: Some(Err), args: Some(GenericArgs { args: [Const(ConstArg { value: AnonConst { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 10 }, body: BodyId { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 14 } } }, span: src/main.rs:7:46: 7:49 (#0) })], bindings: [], parenthesized: false }), infer_args: false })), span: src/main.rs:7:38: 7:50 (#0) })
--> src/main.rs:7:46
|
7 | fn foo<const N: usize>(&self) -> Self::B<{N}>;
| ^^^
|
= note: delayed at compiler/rustc_typeck/src/collect/type_of.rs:83:34
error: internal compiler error: unexpected const parent in type_of_def_id(): Ty(Ty { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 7 }, kind: Path(TypeRelative(Ty { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 9 }, kind: Path(Resolved(None, Path { span: src/main.rs:7:38: 7:50 (#0), res: SelfTy(Some(DefId(0:3 ~ rust_ice[b006]::A)), None), segments: [PathSegment { ident: Self#0, hir_id: Some(HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 8 }), res: Some(SelfTy(Some(DefId(0:3 ~ rust_ice[b006]::A)), None)), args: None, infer_args: false }] })), span: src/main.rs:7:38: 7:50 (#0) }, PathSegment { ident: B#0, hir_id: Some(HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 15 }), res: Some(Err), args: Some(GenericArgs { args: [Const(ConstArg { value: AnonConst { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 10 }, body: BodyId { hir_id: HirId { owner: DefId(0:6 ~ rust_ice[b006]::A::foo), local_id: 14 } } }, span: src/main.rs:7:46: 7:49 (#0) })], bindings: [], parenthesized: false }), infer_args: false })), span: src/main.rs:7:38: 7:50 (#0) })
|
= note: delayed at compiler/rustc_typeck/src/collect/type_of.rs:334:26
error: internal compiler error: TyKind::Error constructed but no error reported
|
= note: delayed at compiler/rustc_typeck/src/check/coercion.rs:1260:42
error: internal compiler error: TyKind::Error constructed but no error reported
|
= note: delayed at compiler/rustc_typeck/src/check/fn_ctxt/checks.rs:707:27
error: internal compiler error: TyKind::Error constructed but no error reported
|
= note: delayed at compiler/rustc_typeck/src/check/coercion.rs:153:49
error: internal compiler error: TyKind::Error constructed but no error reported
|
= note: delayed at compiler/rustc_typeck/src/check/coercion.rs:867:53
error: internal compiler error: cat_expr Errd
--> src/main.rs:7:46
|
7 | fn foo<const N: usize>(&self) -> Self::B<{N}>;
| ^^^
|
= note: delayed at compiler/rustc_typeck/src/check/regionck.rs:405:31
error: internal compiler error: TyKind::Error constructed but no error reported
|
= note: delayed at compiler/rustc_mir_build/src/build/mod.rs:684:18
error: internal compiler error: mir_const_qualif: MIR had errors
--> src/main.rs:7:46
|
7 | fn foo<const N: usize>(&self) -> Self::B<{N}>;
| ^^^
|
= note: delayed at compiler/rustc_mir/src/transform/mod.rs:229:18
error: internal compiler error: PromoteTemps: MIR had errors
--> src/main.rs:7:46
|
7 | fn foo<const N: usize>(&self) -> Self::B<{N}>;
| ^^^
|
= note: delayed at compiler/rustc_mir/src/transform/promote_consts.rs:55:22
error: internal compiler error: broken MIR in DefId(0:8 ~ rust_ice[b006]::A::foo::{constant#0}) ("return type"): bad type [type error]
--> src/main.rs:7:46
|
7 | fn foo<const N: usize>(&self) -> Self::B<{N}>;
| ^^^
|
= note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:253:27
error: internal compiler error: TyKind::Error constructed but no error reported
|
= note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:715:20
error: internal compiler error: broken MIR in DefId(0:8 ~ rust_ice[b006]::A::foo::{constant#0}) (LocalDecl { mutability: Mut, local_info: None, internal: false, is_block_tail: None, ty: [type error], user_ty: None, source_info: SourceInfo { span: src/main.rs:7:46: 7:49 (#0), scope: scope[0] } }): bad type [type error]
--> src/main.rs:7:46
|
7 | fn foo<const N: usize>(&self) -> Self::B<{N}>;
| ^^^
|
= note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:253:27
Code
Playground
Meta
Error output
Backtrace