Fixes #114464
This commit is contained in:
Matthias Krüger 2024-03-24 10:09:56 +01:00
parent db68dc27f4
commit 8ed5e6744f
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,17 @@
// ICE cannot convert Refree.. to a region vid
// issue: rust-lang/rust#114464
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
fn test<const N: usize>() {}
fn wow<'a>() {
test::<{
let _: &'a ();
//~^ ERROR cannot capture late-bound lifetime in constant
3
}>();
}
fn main() {}

View file

@ -0,0 +1,11 @@
error: cannot capture late-bound lifetime in constant
--> $DIR/convert-refree-region-vid-ice-114464.rs:11:17
|
LL | fn wow<'a>() {
| -- lifetime defined here
LL | test::<{
LL | let _: &'a ();
| ^^
error: aborting due to 1 previous error