Skip to content

Commit

Permalink
Normalize symbol ids to 0 in test stdout
Browse files Browse the repository at this point in the history
The number of symbols we allocate (even early on) seems to be platform
dependent. We only care about hygiene for the purposes of this test,
so just set all of the symbol ids to zero
  • Loading branch information
Aaron1011 committed Jun 30, 2020
1 parent 3343733 commit a7c408d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/test/ui/proc-macro/meta-macro-hygiene.rs
Expand Up @@ -3,7 +3,9 @@
// edition:2018
// compile-flags: -Z span-debug -Z unpretty=expanded,hygiene
// check-pass

// normalize-stdout-test "\d+#" -> "0#"
// ^ We don't care about symbol ids, so set them all to 0
// in the stdout
extern crate meta_macro;

fn main() {
Expand Down
18 changes: 10 additions & 8 deletions src/test/ui/proc-macro/meta-macro-hygiene.stdout
@@ -1,18 +1,20 @@
Def site: $DIR/auxiliary/make-macro.rs:5:9: 8:10 (#3)
#![feature /* 280#0 */(prelude_import)]
#[prelude_import /* 527#1 */]
use std /* 687#1 */::prelude /* 526#1 */::v1 /* 783#1 */::*;
#[macro_use /* 404#1 */]
extern crate std /* 687#1 */;
#![feature /* 0#0 */(prelude_import)]
#[prelude_import /* 0#1 */]
use std /* 0#1 */::prelude /* 0#1 */::v1 /* 0#1 */::*;
#[macro_use /* 0#1 */]
extern crate std /* 0#1 */;
// aux-build:make-macro.rs
// aux-build:meta-macro.rs
// edition:2018
// compile-flags: -Z span-debug -Z unpretty=expanded,hygiene
// check-pass
// normalize-stdout-test "\d+#" -> "0#"
// ^ We don't care about symbol ids, so set them all to 0
// in the stdout
extern crate meta_macro /* 0#0 */;

extern crate meta_macro /* 834#0 */;

fn main /* 406#0 */() { }
fn main /* 0#0 */() { }

/*
Expansions:
Expand Down

0 comments on commit a7c408d

Please sign in to comment.