Vendor things

This commit is contained in:
John Doty 2024-03-08 11:03:01 -08:00
parent 5deceec006
commit 977e3c17e5
19434 changed files with 10682014 additions and 0 deletions

View file

@ -0,0 +1,6 @@
#[rustversion::attr(not(nightly), ignore)]
#[test]
fn ui() {
let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/*.rs");
}

View file

@ -0,0 +1,8 @@
use proc_macro_hack::proc_macro_hack;
#[proc_macro_hack]
fn my_macro(input: TokenStream) -> TokenStream {
unimplemented!()
}
fn main() {}

View file

@ -0,0 +1,5 @@
error: functions tagged with `#[proc_macro_hack]` must be `pub`
--> tests/ui/private.rs:4:1
|
4 | fn my_macro(input: TokenStream) -> TokenStream {
| ^^

View file

@ -0,0 +1,8 @@
use proc_macro_hack::proc_macro_hack;
#[proc_macro_hack(fake_call_site)]
pub fn my_macro(input: TokenStream) -> TokenStream {
unimplemented!()
}
fn main() {}

View file

@ -0,0 +1,5 @@
error: unexpected argument to proc_macro_hack macro implementation; args are only accepted on the macro declaration (the `pub use`)
--> tests/ui/unexpected-arg.rs:3:19
|
3 | #[proc_macro_hack(fake_call_site)]
| ^^^^^^^^^^^^^^

View file

@ -0,0 +1,6 @@
use proc_macro_hack::proc_macro_hack;
#[proc_macro_hack]
pub struct What;
fn main() {}

View file

@ -0,0 +1,5 @@
error: unexpected input to #[proc_macro_hack]
--> tests/ui/unexpected.rs:4:5
|
4 | pub struct What;
| ^^^^^^

View file

@ -0,0 +1,6 @@
use proc_macro_hack::proc_macro_hack;
#[proc_macro_hack(fake_call_site, support_nexted)]
pub use demo::some_macro;
fn main() {}

View file

@ -0,0 +1,5 @@
error: expected one of: `support_nested`, `internal_macro_calls`, `fake_call_site`, `only_hack_old_rustc`
--> tests/ui/unknown-arg.rs:3:35
|
3 | #[proc_macro_hack(fake_call_site, support_nexted)]
| ^^^^^^^^^^^^^^