Skip to content

Commit

Permalink
Update tests to use new proc-macro header
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Nov 27, 2024
1 parent f592dd9 commit f94142b
Show file tree
Hide file tree
Showing 399 changed files with 425 additions and 1,084 deletions.
4 changes: 0 additions & 4 deletions tests/codegen/debuginfo-proc-macro/auxiliary/macro_def.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//@ force-host
//@ no-prefer-dynamic
#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:]]
Expand Down
5 changes: 0 additions & 5 deletions tests/incremental/auxiliary/incremental_proc_macro_aux.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;

use proc_macro::TokenStream;
Expand Down
4 changes: 0 additions & 4 deletions tests/incremental/auxiliary/issue-49482-macro-def.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type="proc-macro"]
#![allow(non_snake_case)]

extern crate proc_macro;
Expand Down
1 change: 1 addition & 0 deletions tests/incremental/auxiliary/issue-49482-reexport.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ proc-macro: issue-49482-macro-def.rs
#[macro_use]
extern crate issue_49482_macro_def;

Expand Down
4 changes: 0 additions & 4 deletions tests/incremental/auxiliary/issue-54059.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/incremental_proc_macro.rs
Original file line number Diff line number Diff line change
@@ -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?)

Expand Down
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/issue-110457-same-span-closures/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ aux-build: egui_inspect_derive.rs
//@ proc-macro: egui_inspect_derive.rs
//@ revisions: cpass1 cpass2

extern crate egui_inspect_derive;
Expand Down
1 change: 0 additions & 1 deletion tests/incremental/issue-49482.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@ aux-build:issue-49482-macro-def.rs
//@ aux-build:issue-49482-reexport.rs
//@ revisions: rpass1

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/issue-54059.rs
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ proc-macro: respan.rs
//@ revisions: rpass1 rpass2

extern crate respan;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::TokenStream;

Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/pretty/attr-derive.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 0 additions & 5 deletions tests/pretty/auxiliary/derive-foo.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;

use proc_macro::TokenStream;
Expand Down
4 changes: 0 additions & 4 deletions tests/ui/annotate-snippet/auxiliary/multispan.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/annotate-snippet/multispan.rs
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 0 additions & 4 deletions tests/ui/async-await/issues/auxiliary/issue-60674.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//@ force-host
//@ no-prefer-dynamic
#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::TokenStream;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/issues/issue-60674.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ aux-build:issue-60674.rs
//@ proc-macro: issue-60674.rs
//@ build-pass (FIXME(62277): could be check-pass?)
//@ edition:2018

Expand Down
5 changes: 0 additions & 5 deletions tests/ui/attributes/auxiliary/key-value-expansion.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/attributes/key-value-expansion.rs
Original file line number Diff line number Diff line change
@@ -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)]

Expand Down
5 changes: 0 additions & 5 deletions tests/ui/attributes/main-removed-2/auxiliary/tokyo.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::TokenStream;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/attributes/main-removed-2/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ run-pass
//@ aux-build:tokyo.rs
//@ proc-macro: tokyo.rs
//@ compile-flags:--extern tokyo
//@ edition:2021

Expand Down
4 changes: 0 additions & 4 deletions tests/ui/autodiff/auxiliary/my_macro.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//@ force-host
//@ no-prefer-dynamic
#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::TokenStream;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/autodiff/visibility.rs
Original file line number Diff line number Diff line change
@@ -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)]

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 0 additions & 3 deletions tests/ui/crate-loading/auxiliary/proc-macro.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//@ force-host
//@ no-prefer-dynamic
#![crate_name = "reproduction"]
#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::TokenStream;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/crate-loading/cross-compiled-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ edition:2018
//@ compile-flags:--extern reproduction
//@ aux-build:proc-macro.rs
//@ proc-macro: proc-macro.rs
//@ check-pass

reproduction::mac!();
Expand Down
5 changes: 0 additions & 5 deletions tests/ui/derives/auxiliary/derive-marker-tricky.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]

extern crate proc_macro;
use proc_macro::*;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/derives/derive-marker-tricky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 0 additions & 4 deletions tests/ui/deriving/auxiliary/another-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//@ force-host
//@ no-prefer-dynamic

#![crate_type = "proc-macro"]
#![feature(proc_macro_quote)]

extern crate proc_macro;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/deriving/built-in-proc-macro-scope.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/deriving/built-in-proc-macro-scope.stdout
Original file line number Diff line number Diff line change
@@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/deriving/proc-macro-attribute-mixing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/deriving/proc-macro-attribute-mixing.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 0 additions & 4 deletions tests/ui/diagnostic_namespace/auxiliary/proc-macro-helper.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//@ force-host
//@ no-prefer-dynamic
#![crate_type = "proc-macro"]

extern crate proc_macro;

use proc_macro::TokenStream;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/diagnostic_namespace/existing_proc_macros.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ check-pass
//@ aux-build:proc-macro-helper.rs
//@ proc-macro: proc-macro-helper.rs

extern crate proc_macro_helper;

Expand Down
5 changes: 0 additions & 5 deletions tests/ui/fmt/auxiliary/format-string-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fmt/format-args-capture-first-literal-is-macro.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ aux-build:format-string-proc-macro.rs
//@ proc-macro: format-string-proc-macro.rs

extern crate format_string_proc_macro;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fmt/format-args-capture-issue-106408.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fmt/format-args-capture-macro-hygiene.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fmt/format-expanded-string.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fmt/indoc-issue-106408.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/fmt/respanned-literal-issue-106191.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ aux-build:format-string-proc-macro.rs
//@ proc-macro: format-string-proc-macro.rs

extern crate format_string_proc_macro;

Expand Down
3 changes: 1 addition & 2 deletions tests/ui/hygiene/auxiliary/def-site-async-await.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ edition:2018

extern crate opaque_hygiene;
//@ proc-macro: opaque-hygiene.rs

pub async fn serve() {
opaque_hygiene::make_it!();
Expand Down
4 changes: 0 additions & 4 deletions tests/ui/hygiene/auxiliary/opaque-hygiene.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
1 change: 0 additions & 1 deletion tests/ui/hygiene/issue-77523-def-site-async-await.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ build-pass
//@ aux-build:opaque-hygiene.rs
//@ aux-build:def-site-async-await.rs

// Regression test for issue #77523
Expand Down
5 changes: 0 additions & 5 deletions tests/ui/impl-trait/precise-capturing/auxiliary/no-use-pm.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/impl-trait/precise-capturing/external-macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit f94142b

Please sign in to comment.