Skip to content

Commit 06a9196

Browse files
authored
Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk
compiletest: make path normalization smarter Fixes #59109.
2 parents b75b165 + 695dfe7 commit 06a9196

35 files changed

+247
-154
lines changed

src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: lint level defined here
99
|
1010
LL | #![deny(intra_doc_link_resolution_failure)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
12+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1313

1414
error: aborting due to previous error
1515

src/test/rustdoc-ui/intra-doc-alias-ice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: lint level defined here
99
|
1010
LL | #![deny(intra_doc_link_resolution_failure)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
12+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1313

1414
error: aborting due to previous error
1515

src/test/rustdoc-ui/intra-link-span-ice-55723.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: lint level defined here
99
|
1010
LL | #![deny(intra_doc_link_resolution_failure)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
12+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1313

1414
error: aborting due to previous error
1515

src/test/rustdoc-ui/intra-links-warning-crlf.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@ LL | /// [error]
55
| ^^^^^ cannot be resolved, ignoring
66
|
77
= note: #[warn(intra_doc_link_resolution_failure)] on by default
8-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
8+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
99

1010
warning: `[error1]` cannot be resolved, ignoring it...
1111
--> $DIR/intra-links-warning-crlf.rs:12:11
1212
|
1313
LL | /// docs [error1]
1414
| ^^^^^^ cannot be resolved, ignoring
1515
|
16-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
16+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1717

1818
warning: `[error2]` cannot be resolved, ignoring it...
1919
--> $DIR/intra-links-warning-crlf.rs:14:11
2020
|
2121
LL | /// docs [error2]
2222
| ^^^^^^ cannot be resolved, ignoring
2323
|
24-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
24+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2525

2626
warning: `[error]` cannot be resolved, ignoring it...
2727
--> $DIR/intra-links-warning-crlf.rs:21:20
2828
|
2929
LL | * It also has an [error].
3030
| ^^^^^ cannot be resolved, ignoring
3131
|
32-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
32+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
3333

src/test/rustdoc-ui/intra-links-warning.stderr

+22-22
Original file line numberDiff line numberDiff line change
@@ -5,71 +5,71 @@ LL | //! Test with [Foo::baz], [Bar::foo], ...
55
| ^^^^^^^^ cannot be resolved, ignoring
66
|
77
= note: #[warn(intra_doc_link_resolution_failure)] on by default
8-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
8+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
99

1010
warning: `[Bar::foo]` cannot be resolved, ignoring it...
1111
--> $DIR/intra-links-warning.rs:3:35
1212
|
1313
LL | //! Test with [Foo::baz], [Bar::foo], ...
1414
| ^^^^^^^^ cannot be resolved, ignoring
1515
|
16-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
16+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1717

1818
warning: `[Uniooon::X]` cannot be resolved, ignoring it...
1919
--> $DIR/intra-links-warning.rs:4:13
2020
|
2121
LL | //! , [Uniooon::X] and [Qux::Z].
2222
| ^^^^^^^^^^ cannot be resolved, ignoring
2323
|
24-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
24+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2525

2626
warning: `[Qux::Z]` cannot be resolved, ignoring it...
2727
--> $DIR/intra-links-warning.rs:4:30
2828
|
2929
LL | //! , [Uniooon::X] and [Qux::Z].
3030
| ^^^^^^ cannot be resolved, ignoring
3131
|
32-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
32+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
3333

3434
warning: `[Uniooon::X]` cannot be resolved, ignoring it...
3535
--> $DIR/intra-links-warning.rs:6:14
3636
|
3737
LL | //! , [Uniooon::X] and [Qux::Z].
3838
| ^^^^^^^^^^ cannot be resolved, ignoring
3939
|
40-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
40+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
4141

4242
warning: `[Qux::Z]` cannot be resolved, ignoring it...
4343
--> $DIR/intra-links-warning.rs:6:31
4444
|
4545
LL | //! , [Uniooon::X] and [Qux::Z].
4646
| ^^^^^^ cannot be resolved, ignoring
4747
|
48-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
48+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
4949

5050
warning: `[Qux:Y]` cannot be resolved, ignoring it...
5151
--> $DIR/intra-links-warning.rs:8:13
5252
|
5353
LL | /// [Qux:Y]
5454
| ^^^^^ cannot be resolved, ignoring
5555
|
56-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
56+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
5757

5858
warning: `[error]` cannot be resolved, ignoring it...
5959
--> $DIR/intra-links-warning.rs:51:30
6060
|
6161
LL | * time to introduce a link [error]*/
6262
| ^^^^^ cannot be resolved, ignoring
6363
|
64-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
64+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
6565

6666
warning: `[error]` cannot be resolved, ignoring it...
6767
--> $DIR/intra-links-warning.rs:57:30
6868
|
6969
LL | * time to introduce a link [error]
7070
| ^^^^^ cannot be resolved, ignoring
7171
|
72-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
72+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
7373

7474
warning: `[error]` cannot be resolved, ignoring it...
7575
--> $DIR/intra-links-warning.rs:61:1
@@ -81,19 +81,19 @@ LL | #[doc = "single line [error]"]
8181

8282
single line [error]
8383
^^^^^
84-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
84+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
8585

8686
warning: `[error]` cannot be resolved, ignoring it...
8787
--> $DIR/intra-links-warning.rs:64:1
8888
|
89-
LL | #[doc = "single line with /"escaping/" [error]"]
89+
LL | #[doc = "single line with \"escaping\" [error]"]
9090
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9191
|
9292
= note: the link appears in this line:
9393

9494
single line with "escaping" [error]
9595
^^^^^
96-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
96+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
9797

9898
warning: `[error]` cannot be resolved, ignoring it...
9999
--> $DIR/intra-links-warning.rs:67:1
@@ -107,72 +107,72 @@ LL | | /// [error]
107107

108108
[error]
109109
^^^^^
110-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
110+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
111111

112112
warning: `[error1]` cannot be resolved, ignoring it...
113113
--> $DIR/intra-links-warning.rs:73:11
114114
|
115115
LL | /// docs [error1]
116116
| ^^^^^^ cannot be resolved, ignoring
117117
|
118-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
118+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
119119

120120
warning: `[error2]` cannot be resolved, ignoring it...
121121
--> $DIR/intra-links-warning.rs:75:11
122122
|
123123
LL | /// docs [error2]
124124
| ^^^^^^ cannot be resolved, ignoring
125125
|
126-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
126+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
127127

128128
warning: `[BarA]` cannot be resolved, ignoring it...
129129
--> $DIR/intra-links-warning.rs:14:10
130130
|
131131
LL | /// bar [BarA] bar
132132
| ^^^^ cannot be resolved, ignoring
133133
|
134-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
134+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
135135

136136
warning: `[BarB]` cannot be resolved, ignoring it...
137137
--> $DIR/intra-links-warning.rs:20:9
138138
|
139139
LL | * bar [BarB] bar
140140
| ^^^^ cannot be resolved, ignoring
141141
|
142-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
142+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
143143

144144
warning: `[BarC]` cannot be resolved, ignoring it...
145145
--> $DIR/intra-links-warning.rs:27:6
146146
|
147147
LL | bar [BarC] bar
148148
| ^^^^ cannot be resolved, ignoring
149149
|
150-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
150+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
151151

152152
warning: `[BarD]` cannot be resolved, ignoring it...
153153
--> $DIR/intra-links-warning.rs:38:1
154154
|
155-
LL | #[doc = "Foo/nbar [BarD] bar/nbaz"]
155+
LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
156156
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157157
|
158158
= note: the link appears in this line:
159159

160160
bar [BarD] bar
161161
^^^^
162-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
162+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
163163

164164
warning: `[BarF]` cannot be resolved, ignoring it...
165165
--> $DIR/intra-links-warning.rs:43:9
166166
|
167167
LL | #[doc = $f]
168168
| ^^^^^^^^^^^
169169
...
170-
LL | f!("Foo/nbar [BarF] bar/nbaz");
170+
LL | f!("Foo\nbar [BarF] bar\nbaz");
171171
| ------------------------------- in this macro invocation
172172
|
173173
= note: the link appears in this line:
174174

175175
bar [BarF] bar
176176
^^^^
177-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
177+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
178178

src/test/rustdoc-ui/invalid-syntax.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ warning: could not parse code block as Rust code
33
|
44
LL | /// ```
55
| _____^
6-
LL | | /// /__________pkt->size___________/ /_result->size_/ /__pkt->size__/
6+
LL | | /// \__________pkt->size___________/ \_result->size_/ \__pkt->size__/
77
LL | | /// ```
88
| |_______^
99
|
10-
= note: error from rustc: unknown start of token: /
10+
= note: error from rustc: unknown start of token: \
1111
help: mark blocks that do not contain Rust code as text
1212
|
1313
LL | /// ```text
@@ -35,11 +35,11 @@ warning: could not parse code block as Rust code
3535
|
3636
LL | /// ```
3737
| _____^
38-
LL | | /// /_
38+
LL | | /// \_
3939
LL | | /// ```
4040
| |_______^
4141
|
42-
= note: error from rustc: unknown start of token: /
42+
= note: error from rustc: unknown start of token: \
4343
help: mark blocks that do not contain Rust code as text
4444
|
4545
LL | /// ```text
@@ -50,21 +50,21 @@ warning: could not parse code block as Rust code
5050
|
5151
LL | /// ```rust
5252
| _____^
53-
LL | | /// /_
53+
LL | | /// \_
5454
LL | | /// ```
5555
| |_______^
5656
|
57-
= note: error from rustc: unknown start of token: /
57+
= note: error from rustc: unknown start of token: \
5858

5959
warning: could not parse code block as Rust code
6060
--> $DIR/invalid-syntax.rs:41:9
6161
|
6262
LL | /// code with bad syntax
6363
| _________^
64-
LL | | /// /_
64+
LL | | /// \_
6565
| |__________^
6666
|
67-
= note: error from rustc: unknown start of token: /
67+
= note: error from rustc: unknown start of token: \
6868

6969
warning: could not parse code block as Rust code
7070
--> $DIR/invalid-syntax.rs:55:9
@@ -79,17 +79,17 @@ warning: could not parse code block as Rust code
7979
|
8080
LL | /// ```edition2018
8181
| _____^
82-
LL | | /// /_
82+
LL | | /// \_
8383
LL | | /// ```
8484
| |_______^
8585
|
86-
= note: error from rustc: unknown start of token: /
86+
= note: error from rustc: unknown start of token: \
8787

8888
warning: doc comment contains an invalid Rust code block
8989
--> $DIR/invalid-syntax.rs:63:1
9090
|
9191
LL | / #[doc = "```"]
92-
LL | | /// /_
92+
LL | | /// \_
9393
LL | | #[doc = "```"]
9494
| |______________^
9595
|

src/test/rustdoc-ui/lint-group.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ note: lint level defined here
2727
LL | #![deny(rustdoc)]
2828
| ^^^^^^^
2929
= note: #[deny(intra_doc_link_resolution_failure)] implied by #[deny(rustdoc)]
30-
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
30+
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
3131

3232
error: Missing code example in this documentation
3333
--> $DIR/lint-group.rs:16:1

src/test/ui/cast_char.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: only u8 can be cast into char
22
--> $DIR/cast_char.rs:4:23
33
|
44
LL | const XYZ: char = 0x1F888 as char;
5-
| ^^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'`
5+
| ^^^^^^^^^^^^^^^ help: use a char literal instead: `'\u{1F888}'`
66
|
77
note: lint level defined here
88
--> $DIR/cast_char.rs:1:9
@@ -14,7 +14,7 @@ error: only u8 can be cast into char
1414
--> $DIR/cast_char.rs:6:22
1515
|
1616
LL | const XY: char = 129160 as char;
17-
| ^^^^^^^^^^^^^^ help: use a char literal instead: `'/u{1F888}'`
17+
| ^^^^^^^^^^^^^^ help: use a char literal instead: `'\u{1F888}'`
1818

1919
error: aborting due to 2 previous errors
2020

src/test/ui/error-codes/E0648.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0648]: `export_name` may not contain null characters
22
--> $DIR/E0648.rs:1:1
33
|
4-
LL | #[export_name="/0foo"]
4+
LL | #[export_name="\0foo"]
55
| ^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error

0 commit comments

Comments
 (0)