Skip to content

Commit cdea6d8

Browse files
committed
add test for ICE: no entry found for key for const function in generic_const_exprs #113133
Fixes #113133
1 parent 8ed5e67 commit cdea6d8

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// ICE no entry found for key generics_of
2+
// issue: rust-lang/rust#113133
3+
4+
#![allow(incomplete_features)]
5+
#![feature(generic_const_exprs, non_lifetime_binders)]
6+
7+
pub fn foo()
8+
where
9+
for<const N: usize = { const fn bar() {} bar(); 1 }> ():,
10+
//~^ ERROR defaults for generic parameters are not allowed in `for<...>` binders
11+
{}
12+
13+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: defaults for generic parameters are not allowed in `for<...>` binders
2+
--> $DIR/no-entry-found-for-key-ice-gce-nlb-113133.rs:9:9
3+
|
4+
LL | for<const N: usize = { const fn bar() {} bar(); 1 }> ():,
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
7+
error: aborting due to 1 previous error
8+

0 commit comments

Comments
 (0)