Skip to content

Commit

Permalink
Add regression test for #79825
Browse files Browse the repository at this point in the history
  • Loading branch information
hyd-dev committed Mar 11, 2021
1 parent 88f2a70 commit c8b2c86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/ui/proc-macro/auxiliary/issue-79825.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]

extern crate proc_macro;

use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn assert_input(args: TokenStream, input: TokenStream) -> TokenStream {
assert_eq!(input.to_string(), "trait Alias = Sized ;");
assert!(args.is_empty());
TokenStream::new()
}
10 changes: 10 additions & 0 deletions src/test/ui/proc-macro/issue-79825.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// check-pass
// aux-build:issue-79825.rs
#![feature(trait_alias)]

extern crate issue_79825;

#[issue_79825::assert_input]
trait Alias = Sized;

fn main() {}

0 comments on commit c8b2c86

Please sign in to comment.