diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2024-06-21 11:57:24 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2024-06-21 11:57:24 +0000 |
| commit | a6a83d3d4ed4666ccc5cff4043e2ce89279ad6a4 (patch) | |
| tree | 29a742bcba61bd38287b3b0f2faf6348caf705c4 /tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs | |
| parent | 02aaea18032cd409d7a07ded6d42fc5855484419 (diff) | |
| download | rust-a6a83d3d4ed4666ccc5cff4043e2ce89279ad6a4.tar.gz rust-a6a83d3d4ed4666ccc5cff4043e2ce89279ad6a4.zip | |
bless tests
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs')
| -rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs new file mode 100644 index 00000000000..482a1aef06b --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs @@ -0,0 +1,18 @@ +//@ edition: 2021 +#![feature(effects)] + +trait MyTrait {} + +impl MyTrait for i32 { + async const fn bar(&self) { + //~^ ERROR expected one of `extern` + //~| ERROR functions in trait impls cannot be declared const + //~| ERROR functions cannot be both `const` and `async` + //~| ERROR method `bar` is not a member + //~| ERROR cycle detected when computing type + main8().await; + //~^ ERROR cannot find function + } +} + +fn main() {} |
