Skip to content

Commit

Permalink
Rollup merge of rust-lang#62730 - matthewjasper:hygiene-tests, r=petr…
Browse files Browse the repository at this point in the history
…ochenkov

Consolidate hygiene tests

Some general clean-up extracted out from another PR
  • Loading branch information
Mark-Simulacrum authored Jul 18, 2019
2 parents 831d33b + a4a7bb9 commit aa31ca7
Show file tree
Hide file tree
Showing 29 changed files with 26 additions and 42 deletions.
21 changes: 0 additions & 21 deletions src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// run-pass
// ignore-pretty pretty-printing is unhygienic

#[macro_export]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// run-pass
pub fn f() {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// run-pass
#![crate_type = "lib"]

extern crate my_crate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// run-pass
#![feature(decl_macro)]
#![allow(unused)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/hygiene/dollar-crate-modern.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Make sure `$crate` and `crate` work in for basic cases of nested macros.

// build-pass (FIXME(62277): could be check-pass?)
// check-pass
// aux-build:intercrate.rs

#![feature(decl_macro, crate_in_paths)]
Expand Down
3 changes: 0 additions & 3 deletions src/test/ui/hygiene/expansion-info-reset.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// FIXME: Investigate why expansion info for a single expansion id is reset from
// `MacroBang(format_args)` to `MacroAttribute(derive(Clone))` (issue #52363).

fn main() {
format_args!({ #[derive(Clone)] struct S; });
//~^ ERROR format argument must be a string literal
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/hygiene/expansion-info-reset.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: format argument must be a string literal
--> $DIR/expansion-info-reset.rs:5:18
--> $DIR/expansion-info-reset.rs:2:18
|
LL | format_args!({ #[derive(Clone)] struct S; });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
#![allow(unused_must_use)]
#![feature(decl_macro)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
#![allow(dead_code)]
// ignore-pretty pretty-printing is unhygienic

Expand All @@ -12,7 +12,7 @@ extern crate legacy_interaction;
// ```rust
// macro_rules! m {
// () => {
// fn f() // (1)
// fn f() {} // (1)
// g() // (2)
// }
// }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/hygiene/local_inner_macros.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
// aux-build:local_inner_macros.rs

extern crate local_inner_macros;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/hygiene/transparent-basic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// build-pass (FIXME(62277): could be check-pass?)
// check-pass
// aux-build:transparent-basic.rs

#![feature(decl_macro, rustc_attrs)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// check-pass
// compile-flags: -Zunpretty=expanded,hygiene

// Don't break whenever Symbol numbering changes
// normalize-stdout-test "\d+#" -> "0#"

// minimal junk
#![feature(no_core)]
#![no_core]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// check-pass
// compile-flags: -Zunpretty=expanded,hygiene

// Don't break whenever Symbol numbering changes
// normalize-stdout-test "\d+#" -> "0#"

// minimal junk
#![feature /* 0#0 */(no_core)]
#![no_core /* 0#0 */]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

// aux-build:my_crate.rs
Expand Down
File renamed without changes.

0 comments on commit aa31ca7

Please sign in to comment.