-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
mejrs
committed
Jan 11, 2023
1 parent
f920008
commit a8e3abd
Showing
3 changed files
with
63 additions
and
23 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
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,24 @@ | ||
// check-pass | ||
|
||
#![crate_type = "proc-macro"] | ||
#![allow(private_in_public)] | ||
extern crate proc_macro; | ||
use proc_macro::TokenStream; | ||
|
||
#[proc_macro] | ||
pub fn foo<T>(t: T) -> TokenStream { | ||
TokenStream::new() | ||
} | ||
|
||
trait Project { | ||
type Assoc; | ||
} | ||
|
||
impl Project for () { | ||
type Assoc = TokenStream; | ||
} | ||
|
||
#[proc_macro] | ||
pub fn uwu(_input: <() as Project>::Assoc) -> <() as Project>::Assoc { | ||
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