Skip to content

Commit c639090

Browse files
committed
async-move-2015: Rename test, add comments, remove test output
1 parent 9f12677 commit c639090

5 files changed

+21
-16
lines changed

tests/ui/proc-macro/auxiliary/async-move.rs renamed to tests/ui/proc-macro/auxiliary/edition-gated-async-move-syntax.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// force-host
22
// no-prefer-dynamic
33

4+
// Proc macro helper for issue #89699, used by tests/ui/proc-macro/edition-gated-async-move-
5+
// syntax-issue89699.rs, emitting an `async move` closure. This syntax is only available in
6+
// editions 2018 and up, but is used in edition 2015 in the test.
7+
48
#![crate_type = "proc-macro"]
59

610
extern crate proc_macro;
@@ -31,6 +35,5 @@ pub fn foo(_attr: TokenStream, item: TokenStream) -> TokenStream {
3135
TokenTree::Group(Group::new(Delimiter::Parenthesis, TokenStream::new())),
3236
TokenTree::Group(Group::new(Delimiter::Brace, body)),
3337
]);
34-
eprintln!("{:?}", ret);
3538
ret
3639
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// aux-build:edition-gated-async-move-syntax.rs
2+
// edition: 2015
3+
4+
// 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
5+
6+
extern crate edition_gated_async_move_syntax;
7+
8+
#[edition_gated_async_move_syntax::foo]
9+
fn foo() {} //~ ERROR `async move` blocks are only allowed in Rust 2018 or later
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: `async move` blocks are only allowed in Rust 2018 or later
2+
--> $DIR/edition-gated-async-move-syntax-issue89699.rs:9:1
3+
|
4+
LL | fn foo() {}
5+
| ^^
6+
7+
error: aborting due to previous error
8+

tests/ui/proc-macro/issue-89699.rs

-6
This file was deleted.

tests/ui/proc-macro/issue-89699.stderr

-9
This file was deleted.

0 commit comments

Comments
 (0)