mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
23 lines
732 B
Rust
23 lines
732 B
Rust
// Demonstrates and records a theoretical regressions / breaking changes caused by the
|
|
// introduction of async trait bounds.
|
|
|
|
// Setting the edition to >2015 since we didn't regress `demo! { dyn async }` in Rust 2015.
|
|
//@ edition:2018
|
|
|
|
macro_rules! demo {
|
|
($ty:ty) => { compile_error!("ty"); }; // KEEP THIS RULE FIRST AND AS IS!
|
|
//~^ ERROR ty
|
|
//~| ERROR ty
|
|
|
|
// DON'T MODIFY THE MATCHERS BELOW UNLESS THE ASYNC TRAIT MODIFIER SYNTAX CHANGES!
|
|
|
|
(impl $c:ident Trait) => { /* KEEP THIS EMPTY! */ };
|
|
(dyn $c:ident Trait) => { /* KEEP THIS EMPTY! */ };
|
|
}
|
|
|
|
demo! { impl async Trait } //~ ERROR `async` trait bounds are unstable
|
|
|
|
demo! { dyn async Trait } //~ ERROR `async` trait bounds are unstable
|
|
|
|
fn main() {}
|