2020-06-21 00:59:04 +00:00
|
|
|
PRINT-BANG INPUT (DISPLAY): "hi" 1 + (25) + 1 (1 + 1)
|
|
|
|
PRINT-BANG INPUT (DEBUG): TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Str,
|
|
|
|
symbol: "hi",
|
|
|
|
suffix: None,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:42: 16:46 (#3),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: None,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "1",
|
|
|
|
suffix: None,
|
Remove normalization of `Span` debug output in proc-macro tests
Fixes #74800
The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.
Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".
This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.
Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 17:36:31 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:20:16: 20:17 (#0),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '+',
|
|
|
|
spacing: Alone,
|
Remove normalization of `Span` debug output in proc-macro tests
Fixes #74800
The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.
Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".
This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.
Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 17:36:31 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:20:18: 20:19 (#0),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "25",
|
|
|
|
suffix: None,
|
Remove normalization of `Span` debug output in proc-macro tests
Fixes #74800
The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.
Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".
This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.
Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 17:36:31 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:20:21: 20:23 (#0),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
],
|
Remove normalization of `Span` debug output in proc-macro tests
Fixes #74800
The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.
Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".
This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.
Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 17:36:31 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:20:20: 20:24 (#0),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '+',
|
|
|
|
spacing: Alone,
|
Remove normalization of `Span` debug output in proc-macro tests
Fixes #74800
The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.
Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".
This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.
Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 17:36:31 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:20:25: 20:26 (#0),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "1",
|
|
|
|
suffix: None,
|
Remove normalization of `Span` debug output in proc-macro tests
Fixes #74800
The definition of `is_x86_feature_detected!` (and similar macros)
depends on the platform - it is produced by a `cfg_if!` invocation on
x86, and a plain `#[cfg]` on other platforms. Since it is part of the
prelude, we will end up importing different hygiene information
depending on the platform. This previously required us to avoid printing raw
`SyntaxContext` ids in any tests that uses the standard library, since
the captured output will be platform-dependent.
Previously, we replaced all `SyntaxContext` ids with "#CTXT", and the
raw `Span` lo/hi bytes with "LO..HI".
This commit adds `#![no_std]` and `extern crate std` to all proc-macro
tests that print spans. This suppresses the prelude import, while
still using lang items from `std` (which gives us a buildable binary).
With this apporach, we will only load hygiene information for things
which we explicitly import. This lets us re-add
`-Z unpretty=expanded,hygiene`, since its output can now be made stable
across all platforms.
Additionally, we use `-Z span-debug` in more places, which lets us avoid
the "LO..HI" normalization hack.
2020-08-09 17:36:31 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:20:27: 20:28 (#0),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:47: 16:51 (#3),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "1",
|
|
|
|
suffix: None,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:53: 16:54 (#3),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '+',
|
|
|
|
spacing: Alone,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:55: 16:56 (#3),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "1",
|
|
|
|
suffix: None,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:57: 16:58 (#3),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:52: 16:59 (#3),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
]
|
|
|
|
PRINT-BANG INPUT (DISPLAY): "hi" "hello".len() + "world".len() (1 + 1)
|
|
|
|
PRINT-BANG INPUT (DEBUG): TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Str,
|
|
|
|
symbol: "hi",
|
|
|
|
suffix: None,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:42: 16:46 (#8),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: None,
|
|
|
|
stream: TokenStream [
|
|
|
|
Group {
|
2020-06-24 05:52:48 +00:00
|
|
|
delimiter: None,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Str,
|
|
|
|
symbol: "hello",
|
|
|
|
suffix: None,
|
|
|
|
span: $DIR/nodelim-groups.rs:21:17: 21:24 (#0),
|
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '.',
|
|
|
|
spacing: Alone,
|
|
|
|
span: $DIR/nodelim-groups.rs:21:24: 21:25 (#0),
|
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "len",
|
|
|
|
span: $DIR/nodelim-groups.rs:21:25: 21:28 (#0),
|
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [],
|
|
|
|
span: $DIR/nodelim-groups.rs:21:28: 21:30 (#0),
|
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:15:49: 15:54 (#7),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '+',
|
|
|
|
spacing: Alone,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:15:55: 15:56 (#7),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Group {
|
2020-06-24 05:52:48 +00:00
|
|
|
delimiter: None,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Str,
|
|
|
|
symbol: "world",
|
|
|
|
suffix: None,
|
|
|
|
span: $DIR/nodelim-groups.rs:21:33: 21:40 (#0),
|
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '.',
|
|
|
|
spacing: Alone,
|
|
|
|
span: $DIR/nodelim-groups.rs:21:40: 21:41 (#0),
|
|
|
|
},
|
|
|
|
Ident {
|
|
|
|
ident: "len",
|
|
|
|
span: $DIR/nodelim-groups.rs:21:41: 21:44 (#0),
|
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [],
|
|
|
|
span: $DIR/nodelim-groups.rs:21:44: 21:46 (#0),
|
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:15:57: 15:62 (#7),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:47: 16:51 (#8),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Group {
|
|
|
|
delimiter: Parenthesis,
|
|
|
|
stream: TokenStream [
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "1",
|
|
|
|
suffix: None,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:53: 16:54 (#8),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Punct {
|
|
|
|
ch: '+',
|
|
|
|
spacing: Alone,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:55: 16:56 (#8),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
Literal {
|
|
|
|
kind: Integer,
|
|
|
|
symbol: "1",
|
|
|
|
suffix: None,
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:57: 16:58 (#8),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
],
|
2023-07-10 22:16:28 +00:00
|
|
|
span: $DIR/nodelim-groups.rs:16:52: 16:59 (#8),
|
2020-06-21 00:59:04 +00:00
|
|
|
},
|
|
|
|
]
|