Skip to content

Commit

Permalink
Change all run-pass hygiene tests to ui tests
Browse files Browse the repository at this point in the history
Change some tests to `check-pass` that are only testing name resolution.
  • Loading branch information
matthewjasper committed Jul 16, 2019
1 parent 96234d5 commit 03178f3
Show file tree
Hide file tree
Showing 26 changed files with 14 additions and 21 deletions.
@@ -1,4 +1,3 @@
// run-pass
// ignore-pretty pretty-printing is unhygienic

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

extern crate my_crate;
Expand Down
@@ -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
@@ -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
@@ -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
@@ -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.
@@ -1,4 +1,4 @@
// run-pass
// check-pass
#![allow(unused_must_use)]
#![feature(decl_macro)]

Expand Down
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

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

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

#![feature(decl_macro)]
Expand Down
@@ -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
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -1,4 +1,4 @@
// run-pass
// check-pass
// ignore-pretty pretty-printing is unhygienic

#![feature(decl_macro)]
Expand Down
@@ -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 03178f3

Please sign in to comment.