1
Fork 0
rust/tests/ui/rfcs/rfc-2632-const-trait-impl/ice-120503-async-const-method.rs
2024-06-22 14:11:11 +00:00

18 lines
522 B
Rust

//@ edition: 2021
#![feature(effects)] //~ WARN the feature `effects` is incomplete
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() {}