Skip to content

Commit 177b3d2

Browse files
committed
Add some more operator cases to dump-debug-span-debug.rs.
1 parent 4e5ddf1 commit 177b3d2

File tree

2 files changed

+102
-32
lines changed

2 files changed

+102
-32
lines changed

Diff for: src/test/ui/proc-macro/debug/dump-debug-span-debug.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22
// aux-build:macro-dump-debug.rs
33
// compile-flags: -Z span-debug
44

5+
56
extern crate macro_dump_debug;
67
use macro_dump_debug::dump_debug;
78

89
dump_debug! {
910
ident // ident
1011
r#ident // raw ident
1112
, // alone punct
12-
==> // joint punct
13+
&& // joint punct, two-char op
14+
||> // joint punct, two-char op + one-char op
15+
||<< // joint punct, two-char op + two-char op
16+
..= // joint punct, three-char op
17+
<<=! // joint punct, three-char op + one-char-op
1318
() // empty group
1419
[_] // nonempty group
1520

+96-31
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,231 @@
1-
TokenStream [Ident { ident: "ident", span: $DIR/dump-debug-span-debug.rs:9:5: 9:10 (#0) }, Ident { ident: "r#ident", span: $DIR/dump-debug-span-debug.rs:10:5: 10:12 (#0) }, Punct { ch: ',', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:11:5: 11:6 (#0) }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0) }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0) }, Punct { ch: '>', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:12:7: 12:8 (#0) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 (#0) }], span: $DIR/dump-debug-span-debug.rs:14:5: 14:8 (#0) }, Literal { kind: Integer, symbol: "0", suffix: None, span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: $DIR/dump-debug-span-debug.rs:18:5: 18:8 (#0) }, Literal { kind: Str, symbol: "S", suffix: None, span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:20:5: 20:9 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:21:5: 21:9 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:22:5: 22:13 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:23:5: 23:11 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:24:5: 24:15 (#0) }, Literal { kind: Char, symbol: "C", suffix: None, span: $DIR/dump-debug-span-debug.rs:25:5: 25:8 (#0) }, Literal { kind: Byte, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:29:5: 29:7 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:30:5: 30:9 (#0) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:32:5: 32:10 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:33:5: 33:10 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:34:5: 34:14 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:35:5: 35:12 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:36:5: 36:16 (#0) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:37:5: 37:9 (#0) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0) }]
1+
TokenStream [Ident { ident: "ident", span: $DIR/dump-debug-span-debug.rs:10:5: 10:10 (#0) }, Ident { ident: "r#ident", span: $DIR/dump-debug-span-debug.rs:11:5: 11:12 (#0) }, Punct { ch: ',', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:12:5: 12:6 (#0) }, Punct { ch: '&', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0) }, Punct { ch: '&', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:14:5: 14:7 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:14:5: 14:7 (#0) }, Punct { ch: '>', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:14:7: 14:8 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:15:5: 15:7 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:15:5: 15:7 (#0) }, Punct { ch: '<', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:15:7: 15:9 (#0) }, Punct { ch: '<', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:15:7: 15:9 (#0) }, Punct { ch: '.', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:16:5: 16:8 (#0) }, Punct { ch: '.', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:16:5: 16:8 (#0) }, Punct { ch: '=', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:16:5: 16:8 (#0) }, Punct { ch: '<', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:17:5: 17:8 (#0) }, Punct { ch: '<', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:17:5: 17:8 (#0) }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:17:5: 17:8 (#0) }, Punct { ch: '!', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:17:8: 17:9 (#0) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/dump-debug-span-debug.rs:18:5: 18:7 (#0) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: $DIR/dump-debug-span-debug.rs:19:6: 19:7 (#0) }], span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0) }, Literal { kind: Integer, symbol: "0", suffix: None, span: $DIR/dump-debug-span-debug.rs:22:5: 22:6 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: $DIR/dump-debug-span-debug.rs:23:5: 23:8 (#0) }, Literal { kind: Str, symbol: "S", suffix: None, span: $DIR/dump-debug-span-debug.rs:24:5: 24:8 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:25:5: 25:9 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:27:5: 27:13 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:28:5: 28:11 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:29:5: 29:15 (#0) }, Literal { kind: Char, symbol: "C", suffix: None, span: $DIR/dump-debug-span-debug.rs:30:5: 30:8 (#0) }, Literal { kind: Byte, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:34:5: 34:7 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:35:5: 35:9 (#0) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:36:5: 36:9 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:37:5: 37:10 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:39:5: 39:14 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:40:5: 40:12 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:41:5: 41:16 (#0) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:42:5: 42:9 (#0) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:43:5: 43:10 (#0) }]
22
TokenStream [
33
Ident {
44
ident: "ident",
5-
span: $DIR/dump-debug-span-debug.rs:9:5: 9:10 (#0),
5+
span: $DIR/dump-debug-span-debug.rs:10:5: 10:10 (#0),
66
},
77
Ident {
88
ident: "r#ident",
9-
span: $DIR/dump-debug-span-debug.rs:10:5: 10:12 (#0),
9+
span: $DIR/dump-debug-span-debug.rs:11:5: 11:12 (#0),
1010
},
1111
Punct {
1212
ch: ',',
1313
spacing: Alone,
14-
span: $DIR/dump-debug-span-debug.rs:11:5: 11:6 (#0),
14+
span: $DIR/dump-debug-span-debug.rs:12:5: 12:6 (#0),
15+
},
16+
Punct {
17+
ch: '&',
18+
spacing: Joint,
19+
span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0),
20+
},
21+
Punct {
22+
ch: '&',
23+
spacing: Alone,
24+
span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0),
25+
},
26+
Punct {
27+
ch: '|',
28+
spacing: Joint,
29+
span: $DIR/dump-debug-span-debug.rs:14:5: 14:7 (#0),
30+
},
31+
Punct {
32+
ch: '|',
33+
spacing: Joint,
34+
span: $DIR/dump-debug-span-debug.rs:14:5: 14:7 (#0),
35+
},
36+
Punct {
37+
ch: '>',
38+
spacing: Alone,
39+
span: $DIR/dump-debug-span-debug.rs:14:7: 14:8 (#0),
40+
},
41+
Punct {
42+
ch: '|',
43+
spacing: Joint,
44+
span: $DIR/dump-debug-span-debug.rs:15:5: 15:7 (#0),
45+
},
46+
Punct {
47+
ch: '|',
48+
spacing: Joint,
49+
span: $DIR/dump-debug-span-debug.rs:15:5: 15:7 (#0),
50+
},
51+
Punct {
52+
ch: '<',
53+
spacing: Joint,
54+
span: $DIR/dump-debug-span-debug.rs:15:7: 15:9 (#0),
55+
},
56+
Punct {
57+
ch: '<',
58+
spacing: Alone,
59+
span: $DIR/dump-debug-span-debug.rs:15:7: 15:9 (#0),
60+
},
61+
Punct {
62+
ch: '.',
63+
spacing: Joint,
64+
span: $DIR/dump-debug-span-debug.rs:16:5: 16:8 (#0),
65+
},
66+
Punct {
67+
ch: '.',
68+
spacing: Joint,
69+
span: $DIR/dump-debug-span-debug.rs:16:5: 16:8 (#0),
1570
},
1671
Punct {
1772
ch: '=',
73+
spacing: Alone,
74+
span: $DIR/dump-debug-span-debug.rs:16:5: 16:8 (#0),
75+
},
76+
Punct {
77+
ch: '<',
1878
spacing: Joint,
19-
span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0),
79+
span: $DIR/dump-debug-span-debug.rs:17:5: 17:8 (#0),
80+
},
81+
Punct {
82+
ch: '<',
83+
spacing: Joint,
84+
span: $DIR/dump-debug-span-debug.rs:17:5: 17:8 (#0),
2085
},
2186
Punct {
2287
ch: '=',
2388
spacing: Joint,
24-
span: $DIR/dump-debug-span-debug.rs:12:5: 12:7 (#0),
89+
span: $DIR/dump-debug-span-debug.rs:17:5: 17:8 (#0),
2590
},
2691
Punct {
27-
ch: '>',
92+
ch: '!',
2893
spacing: Alone,
29-
span: $DIR/dump-debug-span-debug.rs:12:7: 12:8 (#0),
94+
span: $DIR/dump-debug-span-debug.rs:17:8: 17:9 (#0),
3095
},
3196
Group {
3297
delimiter: Parenthesis,
3398
stream: TokenStream [],
34-
span: $DIR/dump-debug-span-debug.rs:13:5: 13:7 (#0),
99+
span: $DIR/dump-debug-span-debug.rs:18:5: 18:7 (#0),
35100
},
36101
Group {
37102
delimiter: Bracket,
38103
stream: TokenStream [
39104
Ident {
40105
ident: "_",
41-
span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 (#0),
106+
span: $DIR/dump-debug-span-debug.rs:19:6: 19:7 (#0),
42107
},
43108
],
44-
span: $DIR/dump-debug-span-debug.rs:14:5: 14:8 (#0),
109+
span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0),
45110
},
46111
Literal {
47112
kind: Integer,
48113
symbol: "0",
49114
suffix: None,
50-
span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 (#0),
115+
span: $DIR/dump-debug-span-debug.rs:22:5: 22:6 (#0),
51116
},
52117
Literal {
53118
kind: Float,
54119
symbol: "1.0",
55120
suffix: None,
56-
span: $DIR/dump-debug-span-debug.rs:18:5: 18:8 (#0),
121+
span: $DIR/dump-debug-span-debug.rs:23:5: 23:8 (#0),
57122
},
58123
Literal {
59124
kind: Str,
60125
symbol: "S",
61126
suffix: None,
62-
span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0),
127+
span: $DIR/dump-debug-span-debug.rs:24:5: 24:8 (#0),
63128
},
64129
Literal {
65130
kind: ByteStr,
66131
symbol: "B",
67132
suffix: None,
68-
span: $DIR/dump-debug-span-debug.rs:20:5: 20:9 (#0),
133+
span: $DIR/dump-debug-span-debug.rs:25:5: 25:9 (#0),
69134
},
70135
Literal {
71136
kind: StrRaw(0),
72137
symbol: "R",
73138
suffix: None,
74-
span: $DIR/dump-debug-span-debug.rs:21:5: 21:9 (#0),
139+
span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0),
75140
},
76141
Literal {
77142
kind: StrRaw(2),
78143
symbol: "R",
79144
suffix: None,
80-
span: $DIR/dump-debug-span-debug.rs:22:5: 22:13 (#0),
145+
span: $DIR/dump-debug-span-debug.rs:27:5: 27:13 (#0),
81146
},
82147
Literal {
83148
kind: ByteStrRaw(0),
84149
symbol: "BR",
85150
suffix: None,
86-
span: $DIR/dump-debug-span-debug.rs:23:5: 23:11 (#0),
151+
span: $DIR/dump-debug-span-debug.rs:28:5: 28:11 (#0),
87152
},
88153
Literal {
89154
kind: ByteStrRaw(2),
90155
symbol: "BR",
91156
suffix: None,
92-
span: $DIR/dump-debug-span-debug.rs:24:5: 24:15 (#0),
157+
span: $DIR/dump-debug-span-debug.rs:29:5: 29:15 (#0),
93158
},
94159
Literal {
95160
kind: Char,
96161
symbol: "C",
97162
suffix: None,
98-
span: $DIR/dump-debug-span-debug.rs:25:5: 25:8 (#0),
163+
span: $DIR/dump-debug-span-debug.rs:30:5: 30:8 (#0),
99164
},
100165
Literal {
101166
kind: Byte,
102167
symbol: "B",
103168
suffix: None,
104-
span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0),
169+
span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0),
105170
},
106171
Literal {
107172
kind: Integer,
108173
symbol: "0",
109174
suffix: Some("q"),
110-
span: $DIR/dump-debug-span-debug.rs:29:5: 29:7 (#0),
175+
span: $DIR/dump-debug-span-debug.rs:34:5: 34:7 (#0),
111176
},
112177
Literal {
113178
kind: Float,
114179
symbol: "1.0",
115180
suffix: Some("q"),
116-
span: $DIR/dump-debug-span-debug.rs:30:5: 30:9 (#0),
181+
span: $DIR/dump-debug-span-debug.rs:35:5: 35:9 (#0),
117182
},
118183
Literal {
119184
kind: Str,
120185
symbol: "S",
121186
suffix: Some("q"),
122-
span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0),
187+
span: $DIR/dump-debug-span-debug.rs:36:5: 36:9 (#0),
123188
},
124189
Literal {
125190
kind: ByteStr,
126191
symbol: "B",
127192
suffix: Some("q"),
128-
span: $DIR/dump-debug-span-debug.rs:32:5: 32:10 (#0),
193+
span: $DIR/dump-debug-span-debug.rs:37:5: 37:10 (#0),
129194
},
130195
Literal {
131196
kind: StrRaw(0),
132197
symbol: "R",
133198
suffix: Some("q"),
134-
span: $DIR/dump-debug-span-debug.rs:33:5: 33:10 (#0),
199+
span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0),
135200
},
136201
Literal {
137202
kind: StrRaw(2),
138203
symbol: "R",
139204
suffix: Some("q"),
140-
span: $DIR/dump-debug-span-debug.rs:34:5: 34:14 (#0),
205+
span: $DIR/dump-debug-span-debug.rs:39:5: 39:14 (#0),
141206
},
142207
Literal {
143208
kind: ByteStrRaw(0),
144209
symbol: "BR",
145210
suffix: Some("q"),
146-
span: $DIR/dump-debug-span-debug.rs:35:5: 35:12 (#0),
211+
span: $DIR/dump-debug-span-debug.rs:40:5: 40:12 (#0),
147212
},
148213
Literal {
149214
kind: ByteStrRaw(2),
150215
symbol: "BR",
151216
suffix: Some("q"),
152-
span: $DIR/dump-debug-span-debug.rs:36:5: 36:16 (#0),
217+
span: $DIR/dump-debug-span-debug.rs:41:5: 41:16 (#0),
153218
},
154219
Literal {
155220
kind: Char,
156221
symbol: "C",
157222
suffix: Some("q"),
158-
span: $DIR/dump-debug-span-debug.rs:37:5: 37:9 (#0),
223+
span: $DIR/dump-debug-span-debug.rs:42:5: 42:9 (#0),
159224
},
160225
Literal {
161226
kind: Byte,
162227
symbol: "B",
163228
suffix: Some("q"),
164-
span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0),
229+
span: $DIR/dump-debug-span-debug.rs:43:5: 43:10 (#0),
165230
},
166231
]

0 commit comments

Comments
 (0)