Closed
Description
#![feature(const_generics)]
fn test<const N: usize>() {}
fn wow<'a>() {
test::<{
let _: &'a ();
3
}>();
}
results in
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> src/lib.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
error: internal compiler error: src/librustc_mir/borrow_check/universal_regions.rs:768:36: cannot convert `ReFree(DefId(0:5 ~ playground[38a3]::wow[0]), BrNamed(DefId(0:6 ~ playground[38a3]::wow[0]::'a[0]), 'a))` to a region vid
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:916:9
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.46.0-nightly (5c9e5df3a 2020-07-16) running on x86_64-unknown-linux-gnu
note: compiler flags: -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: aborting due to previous error; 1 warning emitted