Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ edition: 2018
// regression test for #119316
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

async fn foo<'a>() {
let _data = &mut [0u8; { N + (|| 42)() }];
//~^ ERROR cannot find value `N` in this scope
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error[E0425]: cannot find value `N` in this scope
--> $DIR/closure-in-array-len-ice-119316.rs:7:30
|
LL | let _data = &mut [0u8; { N + (|| 42)() }];
| ^ not found in this scope
|
help: you might be missing a const parameter
|
LL | async fn foo<'a, const N: /* Type */>() {
| +++++++++++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0425`.
Loading