mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
Update tests to use new proc-macro header
This commit is contained in:
parent
f592dd95db
commit
f94142b366
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::*;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// MSVC is different because of the individual allocas.
|
||||
//@ ignore-msvc
|
||||
|
||||
//@ aux-build:macro_def.rs
|
||||
//@ proc-macro: macro_def.rs
|
||||
|
||||
// Find the variable.
|
||||
// CHECK-DAG: ![[#var_dbg:]] = !DILocalVariable(name: "n",{{( arg: 1,)?}} scope: ![[#var_scope:]]
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type="proc-macro"]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ proc-macro: issue-49482-macro-def.rs
|
||||
#[macro_use]
|
||||
extern crate issue_49482_macro_def;
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
// check that having extern "C" functions in a proc macro doesn't crash.
|
||||
|
||||
#![crate_type="proc-macro"]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:incremental_proc_macro_aux.rs
|
||||
//@ proc-macro: incremental_proc_macro_aux.rs
|
||||
//@ revisions: cfail1 cfail2
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree};
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build: egui_inspect_derive.rs
|
||||
//@ proc-macro: egui_inspect_derive.rs
|
||||
//@ revisions: cpass1 cpass2
|
||||
|
||||
extern crate egui_inspect_derive;
|
||||
|
@ -1,4 +1,3 @@
|
||||
//@ aux-build:issue-49482-macro-def.rs
|
||||
//@ aux-build:issue-49482-reexport.rs
|
||||
//@ revisions: rpass1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:issue-54059.rs
|
||||
//@ proc-macro: issue-54059.rs
|
||||
//@ ignore-windows - dealing with weird symbols issues on dylibs isn't worth it
|
||||
//@ revisions: rpass1
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ proc-macro: respan.rs
|
||||
//@ revisions: rpass1 rpass2
|
||||
|
||||
extern crate respan;
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ revisions: rpass1 rpass2
|
||||
//@ aux-build:respan.rs
|
||||
//@ aux-build:invalid-span-helper-lib.rs
|
||||
|
||||
// This issue has several different parts. The high level idea is:
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:derive-foo.rs
|
||||
//@ proc-macro: derive-foo.rs
|
||||
//@ pp-exact
|
||||
// Testing that both the inner item and next outer item are
|
||||
// preserved, and that the first outer item parsed in main is not
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:multispan.rs
|
||||
//@ proc-macro: multispan.rs
|
||||
//@ error-pattern:hello to you, too!
|
||||
//@ compile-flags: --error-format human-annotate-rs -Z unstable-options
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:issue-60674.rs
|
||||
//@ proc-macro: issue-60674.rs
|
||||
//@ build-pass (FIXME(62277): could be check-pass?)
|
||||
//@ edition:2018
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::*;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Regression tests for issue #55414, expansion happens in the value of a key-value attribute,
|
||||
// and the expanded expression is more complex than simply a macro call.
|
||||
|
||||
//@ aux-build:key-value-expansion.rs
|
||||
//@ proc-macro: key-value-expansion.rs
|
||||
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:tokyo.rs
|
||||
//@ proc-macro: tokyo.rs
|
||||
//@ compile-flags:--extern tokyo
|
||||
//@ edition:2021
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//@ ignore-enzyme
|
||||
//@ revisions: std_autodiff no_std_autodiff
|
||||
//@[no_std_autodiff] check-pass
|
||||
//@ aux-build: my_macro.rs
|
||||
//@ proc-macro: my_macro.rs
|
||||
#![crate_type = "lib"]
|
||||
#![feature(autodiff)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:ver-cfg-rel.rs
|
||||
//@ proc-macro: ver-cfg-rel.rs
|
||||
//@ revisions: assume no_assume
|
||||
//@ [assume]compile-flags: -Z assume-incomplete-release
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::{TokenStream, TokenTree as Tt};
|
||||
use std::str::FromStr;
|
||||
|
@ -1,7 +1,4 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_name = "reproduction"]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ edition:2018
|
||||
//@ compile-flags:--extern reproduction
|
||||
//@ aux-build:proc-macro.rs
|
||||
//@ proc-macro: proc-macro.rs
|
||||
//@ check-pass
|
||||
|
||||
reproduction::mac!();
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::*;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// a built-in derive in non-trivial scope (e.g. in a nested module).
|
||||
|
||||
//@ check-pass
|
||||
//@ aux-build:derive-marker-tricky.rs
|
||||
//@ proc-macro: derive-marker-tricky.rs
|
||||
|
||||
extern crate derive_marker_tricky;
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_quote)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ aux-build: another-proc-macro.rs
|
||||
//@ proc-macro: another-proc-macro.rs
|
||||
//@ compile-flags: -Zunpretty=expanded
|
||||
|
||||
#![feature(derive_coerce_pointee)]
|
||||
|
@ -1,7 +1,7 @@
|
||||
#![feature(prelude_import)]
|
||||
#![no_std]
|
||||
//@ check-pass
|
||||
//@ aux-build: another-proc-macro.rs
|
||||
//@ proc-macro: another-proc-macro.rs
|
||||
//@ compile-flags: -Zunpretty=expanded
|
||||
|
||||
#![feature(derive_coerce_pointee)]
|
||||
|
@ -5,7 +5,7 @@
|
||||
// are in scope.
|
||||
|
||||
//@ check-pass
|
||||
//@ aux-build: another-proc-macro.rs
|
||||
//@ proc-macro: another-proc-macro.rs
|
||||
//@ compile-flags: -Zunpretty=expanded
|
||||
|
||||
#![feature(derive_coerce_pointee)]
|
||||
|
@ -7,7 +7,7 @@
|
||||
// are in scope.
|
||||
|
||||
//@ check-pass
|
||||
//@ aux-build: another-proc-macro.rs
|
||||
//@ proc-macro: another-proc-macro.rs
|
||||
//@ compile-flags: -Zunpretty=expanded
|
||||
|
||||
#![feature(derive_coerce_pointee)]
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ aux-build:proc-macro-helper.rs
|
||||
//@ proc-macro: proc-macro-helper.rs
|
||||
|
||||
extern crate proc_macro_helper;
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree};
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate format_string_proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
|
||||
extern crate format_string_proc_macro;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
|
||||
extern crate format_string_proc_macro;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate format_string_proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate format_string_proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
//@ check-pass
|
||||
|
||||
extern crate format_string_proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:format-string-proc-macro.rs
|
||||
//@ proc-macro: format-string-proc-macro.rs
|
||||
|
||||
extern crate format_string_proc_macro;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
//@ edition:2018
|
||||
|
||||
extern crate opaque_hygiene;
|
||||
//@ proc-macro: opaque-hygiene.rs
|
||||
|
||||
pub async fn serve() {
|
||||
opaque_hygiene::make_it!();
|
||||
|
@ -1,8 +1,4 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![feature(proc_macro_quote)]
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::{TokenStream, quote};
|
||||
|
@ -1,5 +1,4 @@
|
||||
//@ build-pass
|
||||
//@ aux-build:opaque-hygiene.rs
|
||||
//@ aux-build:def-site-async-await.rs
|
||||
|
||||
// Regression test for issue #77523
|
||||
|
@ -1,11 +1,6 @@
|
||||
// A proc-macro in 2015 that has an RPIT without `use<>` that would cause a
|
||||
// problem with 2024 capturing rules.
|
||||
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// has an RPIT will not fail when the call-site is 2024.
|
||||
// https://github.com/rust-lang/rust/issues/132917
|
||||
|
||||
//@ aux-crate: no_use_pm=no-use-pm.rs
|
||||
//@ proc-macro: no-use-pm.rs
|
||||
//@ aux-crate: no_use_macro=no-use-macro.rs
|
||||
//@ edition: 2024
|
||||
//@ check-pass
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
use proc_macro::{Ident, Group, TokenStream, TokenTree as Tt};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:repeat.rs
|
||||
//@ proc-macro: repeat.rs
|
||||
|
||||
// This tests the allocating algo branch of the
|
||||
// inherent impls overlap checker.
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:repeat.rs
|
||||
//@ proc-macro: repeat.rs
|
||||
|
||||
#![allow(unused)]
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
//#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:issue-91763-aux.rs
|
||||
//@ proc-macro: issue-91763-aux.rs
|
||||
|
||||
#![deny(elided_lifetimes_in_paths)]
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,6 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
#![crate_type="proc-macro"]
|
||||
#![crate_name="redundant_semi_proc_macro"]
|
||||
extern crate proc_macro;
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:redundant-semi-proc-macro-def.rs
|
||||
//@ proc-macro: redundant-semi-proc-macro-def.rs
|
||||
|
||||
#![deny(redundant_semicolons)]
|
||||
extern crate redundant_semi_proc_macro;
|
||||
|
@ -1,4 +1,4 @@
|
||||
TokenStream [Ident { ident: "fn", span: #0 bytes(199..201) }, Ident { ident: "span_preservation", span: #0 bytes(202..219) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(219..221) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(229..232) }, Ident { ident: "tst", span: #0 bytes(233..236) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(237..238) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(239..242) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(242..243) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(243..244) }, Ident { ident: "match", span: #0 bytes(290..295) }, Ident { ident: "tst", span: #0 bytes(296..299) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(484..487) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(488..489) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(489..490) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(491..493) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(493..494) }, Ident { ident: "_", span: #0 bytes(503..504) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(505..506) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(506..507) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(508..510) }], span: #0 bytes(300..516) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(516..517) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(517..518) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(518..519) }], span: #0 bytes(223..563) }]
|
||||
TokenStream [Ident { ident: "fn", span: #0 bytes(201..203) }, Ident { ident: "span_preservation", span: #0 bytes(204..221) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(221..223) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(231..234) }, Ident { ident: "tst", span: #0 bytes(235..238) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(239..240) }, Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(241..244) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(244..245) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(245..246) }, Ident { ident: "match", span: #0 bytes(292..297) }, Ident { ident: "tst", span: #0 bytes(298..301) }, Group { delimiter: Brace, stream: TokenStream [Literal { kind: Integer, symbol: "123", suffix: None, span: #0 bytes(486..489) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(490..491) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(491..492) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(493..495) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(495..496) }, Ident { ident: "_", span: #0 bytes(505..506) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(507..508) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(508..509) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(510..512) }], span: #0 bytes(302..518) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(518..519) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(519..520) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(520..521) }], span: #0 bytes(225..565) }]
|
||||
error: unnecessary trailing semicolon
|
||||
--> $DIR/redundant-semi-proc-macro.rs:9:19
|
||||
|
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ aux-build:forge_unsafe_block.rs
|
||||
//@ proc-macro: forge_unsafe_block.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate forge_unsafe_block;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:add-impl.rs
|
||||
//@ proc-macro: add-impl.rs
|
||||
|
||||
#![forbid(unused_qualifications)]
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_quote)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_quote)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_quote)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -1,7 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![feature(proc_macro_span, proc_macro_quote)]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
@ -5,7 +5,7 @@ struct Foo {}
|
||||
// an unexpected dummy span (lo == 0 == hi) while attempting to print a
|
||||
// suggestion.
|
||||
|
||||
//@ aux-build: issue-100199.rs
|
||||
//@ proc-macro: issue-100199.rs
|
||||
|
||||
extern crate issue_100199;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Test that a macro can emit delimiters with nothing inside - `()`, `{}`
|
||||
|
||||
//@ run-pass
|
||||
//@ aux-build:hello_macro.rs
|
||||
//@ proc-macro: hello_macro.rs
|
||||
|
||||
extern crate hello_macro;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:proc_macro_def.rs
|
||||
//@ proc-macro: proc_macro_def.rs
|
||||
|
||||
extern crate proc_macro_def;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:proc_macro_sequence.rs
|
||||
//@ proc-macro: proc_macro_sequence.rs
|
||||
|
||||
// Regression test for issue #62831: Check that multiple sequences with the same span in the
|
||||
// left-hand side of a macro definition behave as if they had unique spans, and in particular that
|
||||
|
@ -17,9 +17,9 @@ LL | $(= $z:tt)*
|
||||
error: `$x:expr` may be followed by `$y:tt`, which is not allowed for `expr` fragments
|
||||
--> $DIR/same-sequence-span.rs:19:1
|
||||
|
|
||||
LL | | }
|
||||
LL | | macro_rules! manual_foo {
|
||||
| |_________________________________^ not allowed after `expr` fragments
|
||||
LL |
|
||||
...
|
||||
LL | proc_macro_sequence::make_foo!();
|
||||
| ^-------------------------------
|
||||
| |
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs
|
||||
//@ proc-macro: issue-89971-outer-attr-following-inner-attr-ice.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate issue_89971_outer_attr_following_inner_attr_ice;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:add-impl.rs
|
||||
//@ proc-macro: add-impl.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate add_impl;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ aux-build:attr-stmt-expr.rs
|
||||
//@ aux-build:test-macros.rs
|
||||
//@ proc-macro: attr-stmt-expr.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
//@ compile-flags: -Z span-debug
|
||||
//@ check-pass
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:builtin-attrs.rs
|
||||
//@ proc-macro: builtin-attrs.rs
|
||||
//@ compile-flags:--test
|
||||
|
||||
#![feature(decl_macro, test)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ edition:2018
|
||||
//@ aux-build:builtin-attrs.rs
|
||||
//@ proc-macro: builtin-attrs.rs
|
||||
#![feature(decl_macro)] //~ ERROR `feature` is ambiguous
|
||||
|
||||
extern crate builtin_attrs;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:amputate-span.rs
|
||||
//@ proc-macro: amputate-span.rs
|
||||
//@ run-rustfix
|
||||
//@ edition:2018
|
||||
//@ compile-flags: --extern amputate_span
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:amputate-span.rs
|
||||
//@ proc-macro: amputate-span.rs
|
||||
//@ run-rustfix
|
||||
//@ edition:2018
|
||||
//@ compile-flags: --extern amputate_span
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:append-impl.rs
|
||||
//@ proc-macro: append-impl.rs
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:attr-args.rs
|
||||
//@ proc-macro: attr-args.rs
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:attr-cfg.rs
|
||||
//@ proc-macro: attr-cfg.rs
|
||||
//@ revisions: foo bar
|
||||
|
||||
extern crate attr_cfg;
|
||||
|
@ -1,6 +1,6 @@
|
||||
//@ check-pass
|
||||
//@ compile-flags: -Z span-debug --error-format human
|
||||
//@ aux-build:test-macros.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(custom_inner_attributes)]
|
||||
|
@ -1,6 +1,6 @@
|
||||
//! Attributes producing expressions in invalid locations
|
||||
|
||||
//@ aux-build:attr-stmt-expr.rs
|
||||
//@ proc-macro: attr-stmt-expr.rs
|
||||
|
||||
#![feature(proc_macro_hygiene)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:attr-on-trait.rs
|
||||
//@ proc-macro: attr-on-trait.rs
|
||||
|
||||
extern crate attr_on_trait;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ run-pass
|
||||
//@ aux-build:attr-stmt-expr-rpass.rs
|
||||
//@ proc-macro: attr-stmt-expr-rpass.rs
|
||||
|
||||
#![feature(stmt_expr_attributes, proc_macro_hygiene)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ aux-build:attr-stmt-expr.rs
|
||||
//@ aux-build:test-macros.rs
|
||||
//@ proc-macro: attr-stmt-expr.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
//@ compile-flags: -Z span-debug
|
||||
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
//@ check-pass
|
||||
//@ compile-flags: -Z span-debug
|
||||
//@ aux-build: test-macros.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
|
||||
#![no_std] // Don't load unnecessary hygiene information from std
|
||||
extern crate std;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:attribute-spans-preserved.rs
|
||||
//@ proc-macro: attribute-spans-preserved.rs
|
||||
|
||||
extern crate attribute_spans_preserved as foo;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:test-macros.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
|
||||
#![feature(custom_inner_attributes)]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:attributes-included.rs
|
||||
//@ proc-macro: attributes-included.rs
|
||||
//@ check-pass
|
||||
|
||||
#![warn(unused)]
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ aux-build:attributes-on-definitions.rs
|
||||
//@ proc-macro: attributes-on-definitions.rs
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ aux-build:test-macros.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate test_macros;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//@ check-pass
|
||||
//@ aux-build:test-macros.rs
|
||||
//@ proc-macro: test-macros.rs
|
||||
|
||||
#[macro_use]
|
||||
extern crate test_macros;
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
@ -1,9 +1,5 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
//@ edition: 2021
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
#![crate_name = "proc_macro_api_tests"]
|
||||
#![feature(proc_macro_span)]
|
||||
#![deny(dead_code)] // catch if a test function is never called
|
||||
|
@ -1,8 +1,3 @@
|
||||
//@ force-host
|
||||
//@ no-prefer-dynamic
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user