diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/async-await/repeat_count_const_in_async_fn.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/async-await/repeat_count_const_in_async_fn.rs b/src/test/ui/async-await/repeat_count_const_in_async_fn.rs new file mode 100644 index 000000000..ebabc3fbf --- /dev/null +++ b/src/test/ui/async-await/repeat_count_const_in_async_fn.rs @@ -0,0 +1,10 @@ +// check-pass +// edition:2018 +// compile-flags: --crate-type=lib + +pub async fn test() { + const C: usize = 4; + foo(&mut [0u8; C]).await; +} + +async fn foo(_: &mut [u8]) {} |