diff options
| author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-11-07 13:17:00 +0100 |
|---|---|---|
| committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-11-20 13:15:08 +0100 |
| commit | fd70a4ca1741d1147ba2288d909857566598efee (patch) | |
| tree | f13c0a5ce7547e2abe779cf1871637fda79ba900 /tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs | |
| parent | 19079cf804330a0d3d767a19a935c5eebdfeba0f (diff) | |
| download | rust-fd70a4ca1741d1147ba2288d909857566598efee.tar.gz rust-fd70a4ca1741d1147ba2288d909857566598efee.zip | |
test: Add test for async-move in 2015 Rust proc macro
Add a test to ensure issue #89699 does not show up again. This test emits an `async move` closure in a proc macro, which is used in a test program compiled with edition 2015. We make sure the error message is nice and shows up properly.
Diffstat (limited to 'tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs')
| -rw-r--r-- | tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs new file mode 100644 index 00000000000..1a9d4601aca --- /dev/null +++ b/tests/ui/proc-macro/edition-gated-async-move-syntax-issue89699.rs @@ -0,0 +1,10 @@ +// aux-build:edition-gated-async-move-syntax.rs +// edition: 2015 + +// Non-regression test for issue #89699, where a proc-macro emitting syntax only available in +// edition 2018 and up (`async move`) is used on edition 2015 + +extern crate edition_gated_async_move_syntax; + +#[edition_gated_async_move_syntax::foo] +fn foo() {} //~ ERROR `async move` blocks are only allowed in Rust 2018 or later |
