-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hyd-dev
committed
Mar 11, 2021
1 parent
88f2a70
commit c8b2c86
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} |