rust/tests/ui/async-await/async-fn/mbe-async-trait-bound-theoretical-regression.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
561 B
Rust
Raw Normal View History

2024-02-20 16:09:03 +00:00
// Demonstrates and records a theoretical regressions / breaking changes caused by the
// introduction of async trait bounds.
// Setting the edition to 2018 since we don't regress `demo! { dyn async }` in Rust <2018.
//@ edition:2018
macro_rules! demo {
($ty:ty) => { compile_error!("ty"); };
//~^ ERROR ty
//~| ERROR ty
(impl $c:ident Trait) => {};
(dyn $c:ident Trait) => {};
}
demo! { impl async Trait }
//~^ ERROR `async` trait bounds are unstable
2024-02-20 16:09:03 +00:00
demo! { dyn async Trait }
//~^ ERROR `async` trait bounds are unstable
2024-02-20 16:09:03 +00:00
fn main() {}