diff options
Diffstat (limited to 'tests/ui/async-await/issues/issue-95307.rs')
-rw-r--r-- | tests/ui/async-await/issues/issue-95307.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/async-await/issues/issue-95307.rs b/tests/ui/async-await/issues/issue-95307.rs new file mode 100644 index 000000000..f7e48070c --- /dev/null +++ b/tests/ui/async-await/issues/issue-95307.rs @@ -0,0 +1,13 @@ +// edition:2018 + +// Regression test for #95307. +// The ICE occurred on all the editions, specifying edition:2018 to reduce diagnostics. + +pub trait C { + async fn new() -> [u8; _]; + //~^ ERROR: functions in traits cannot be declared `async` + //~| ERROR: using `_` for array lengths is unstable + //~| ERROR: in expressions, `_` can only be used on the left-hand side of an assignment +} + +fn main() {} |