Skip to content

Commit a7c408d

Browse files
committed
Normalize symbol ids to 0 in test stdout
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
1 parent 3343733 commit a7c408d

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

src/test/ui/proc-macro/meta-macro-hygiene.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// edition:2018
44
// compile-flags: -Z span-debug -Z unpretty=expanded,hygiene
55
// check-pass
6-
6+
// normalize-stdout-test "\d+#" -> "0#"
7+
// ^ We don't care about symbol ids, so set them all to 0
8+
// in the stdout
79
extern crate meta_macro;
810

911
fn main() {

src/test/ui/proc-macro/meta-macro-hygiene.stdout

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
Def site: $DIR/auxiliary/make-macro.rs:5:9: 8:10 (#3)
2-
#![feature /* 280#0 */(prelude_import)]
3-
#[prelude_import /* 527#1 */]
4-
use std /* 687#1 */::prelude /* 526#1 */::v1 /* 783#1 */::*;
5-
#[macro_use /* 404#1 */]
6-
extern crate std /* 687#1 */;
2+
#![feature /* 0#0 */(prelude_import)]
3+
#[prelude_import /* 0#1 */]
4+
use std /* 0#1 */::prelude /* 0#1 */::v1 /* 0#1 */::*;
5+
#[macro_use /* 0#1 */]
6+
extern crate std /* 0#1 */;
77
// aux-build:make-macro.rs
88
// aux-build:meta-macro.rs
99
// edition:2018
1010
// compile-flags: -Z span-debug -Z unpretty=expanded,hygiene
1111
// check-pass
12+
// normalize-stdout-test "\d+#" -> "0#"
13+
// ^ We don't care about symbol ids, so set them all to 0
14+
// in the stdout
15+
extern crate meta_macro /* 0#0 */;
1216

13-
extern crate meta_macro /* 834#0 */;
14-
15-
fn main /* 406#0 */() { }
17+
fn main /* 0#0 */() { }
1618

1719
/*
1820
Expansions:

0 commit comments

Comments
 (0)