File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
tests/ui/const-generics/generic_const_exprs Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ // issue: rust-lang/rust#114463
2
+ // ICE cannot convert `ReFree ..` to a region vid
3
+ #![ feature( generic_const_exprs) ]
4
+ //~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
5
+ fn bug < ' a > ( ) {
6
+ [ ( ) ; ( |_: & ' a u8 | ( ) , 0 ) . 1 ] ;
7
+ //~^ ERROR cannot capture late-bound lifetime in constant
8
+ }
9
+
10
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
2
+ --> $DIR/cannot-convert-refree-ice-114463.rs:3:12
3
+ |
4
+ LL | #![feature(generic_const_exprs)]
5
+ | ^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
8
+ = note: `#[warn(incomplete_features)]` on by default
9
+
10
+ error: cannot capture late-bound lifetime in constant
11
+ --> $DIR/cannot-convert-refree-ice-114463.rs:6:16
12
+ |
13
+ LL | fn bug<'a>() {
14
+ | -- lifetime defined here
15
+ LL | [(); (|_: &'a u8| (), 0).1];
16
+ | ^^
17
+
18
+ error: aborting due to 1 previous error; 1 warning emitted
19
+
You can’t perform that action at this time.
0 commit comments