1
Fork 0

Add regression test for #60674.

This commit adds a regression test (with current broken behaviour) that
tests that `mut` patterns are not lost when provided as input to a proc macro.
This commit is contained in:
David Wood 2019-05-09 18:13:21 +01:00
parent 9f83961584
commit e57c7b859d
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154
3 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,12 @@
// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_attribute]
pub fn attr(_args: TokenStream, input: TokenStream) -> TokenStream {
println!("{}", input);
TokenStream::new()
}

View file

@ -0,0 +1,14 @@
// aux-build:issue-60674.rs
// compile-pass
// edition:2018
#![feature(async_await)]
// This is a regression test that ensures that `mut` patterns are not lost when provided as input
// to a proc macro.
extern crate issue_60674;
#[issue_60674::attr]
async fn f(mut x: u8) {}
fn main() {}

View file

@ -0,0 +1 @@
async fn f(x: u8) { }