Skip to content

Commit 5a6f122

Browse files
committed
Auto merge of #54813 - petrochenkov:uilocale, r=alexcrichton
Fix two UI tests with locale-dependent output Closes #54719
2 parents 987a50b + a7cce47 commit 5a6f122

File tree

4 files changed

+20
-42
lines changed

4 files changed

+20
-42
lines changed

src/test/ui/extern/external-doc-error.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
11-
// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
12-
// ignore-tidy-linelength
1+
// normalize-stderr-test: "not-a-file.md:.*\(" -> "not-a-file.md: $$FILE_NOT_FOUND_MSG ("
132

143
#![feature(external_doc)]
154

src/test/ui/extern/external-doc-error.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error: couldn't read $DIR/not-a-file.md: No such file or directory (os error 2)
2-
--> $DIR/external-doc-error.rs:16:1
1+
error: couldn't read $DIR/not-a-file.md: $FILE_NOT_FOUND_MSG (os error 2)
2+
--> $DIR/external-doc-error.rs:5:1
33
|
44
LL | #[doc(include = "not-a-file.md")] //~ ERROR: couldn't read
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/macros/macros-nonfatal-errors.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
11-
// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
12-
// ignore-tidy-linelength
1+
// normalize-stderr-test: "existed:.*\(" -> "existed: $$FILE_NOT_FOUND_MSG ("
132

143
// test that errors in a (selection) of macros don't kill compilation
154
// immediately, so that we get more errors listed at a time.

src/test/ui/macros/macros-nonfatal-errors.stderr

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
error[E0665]: `Default` cannot be derived for enums, only structs
2-
--> $DIR/macros-nonfatal-errors.rs:20:10
2+
--> $DIR/macros-nonfatal-errors.rs:9:10
33
|
44
LL | #[derive(Default)] //~ ERROR
55
| ^^^^^^^
66

77
error: inline assembly must be a string literal
8-
--> $DIR/macros-nonfatal-errors.rs:24:10
8+
--> $DIR/macros-nonfatal-errors.rs:13:10
99
|
1010
LL | asm!(invalid); //~ ERROR
1111
| ^^^^^^^
1212

1313
error: concat_idents! requires ident args.
14-
--> $DIR/macros-nonfatal-errors.rs:26:5
14+
--> $DIR/macros-nonfatal-errors.rs:15:5
1515
|
1616
LL | concat_idents!("not", "idents"); //~ ERROR
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

1919
error: argument must be a string literal
20-
--> $DIR/macros-nonfatal-errors.rs:28:17
20+
--> $DIR/macros-nonfatal-errors.rs:17:17
2121
|
2222
LL | option_env!(invalid); //~ ERROR
2323
| ^^^^^^^
2424

2525
error: expected string literal
26-
--> $DIR/macros-nonfatal-errors.rs:29:10
26+
--> $DIR/macros-nonfatal-errors.rs:18:10
2727
|
2828
LL | env!(invalid); //~ ERROR
2929
| ^^^^^^^
3030

3131
error: expected string literal
32-
--> $DIR/macros-nonfatal-errors.rs:30:10
32+
--> $DIR/macros-nonfatal-errors.rs:19:10
3333
|
3434
LL | env!(foo, abr, baz); //~ ERROR
3535
| ^^^
3636

3737
error: environment variable `RUST_HOPEFULLY_THIS_DOESNT_EXIST` not defined
38-
--> $DIR/macros-nonfatal-errors.rs:31:5
38+
--> $DIR/macros-nonfatal-errors.rs:20:5
3939
|
4040
LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
error: format argument must be a string literal
44-
--> $DIR/macros-nonfatal-errors.rs:33:13
44+
--> $DIR/macros-nonfatal-errors.rs:22:13
4545
|
4646
LL | format!(invalid); //~ ERROR
4747
| ^^^^^^^
@@ -51,37 +51,37 @@ LL | format!("{}", invalid); //~ ERROR
5151
| ^^^^^
5252

5353
error: argument must be a string literal
54-
--> $DIR/macros-nonfatal-errors.rs:35:14
54+
--> $DIR/macros-nonfatal-errors.rs:24:14
5555
|
5656
LL | include!(invalid); //~ ERROR
5757
| ^^^^^^^
5858

5959
error: argument must be a string literal
60-
--> $DIR/macros-nonfatal-errors.rs:37:18
60+
--> $DIR/macros-nonfatal-errors.rs:26:18
6161
|
6262
LL | include_str!(invalid); //~ ERROR
6363
| ^^^^^^^
6464

65-
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: No such file or directory (os error 2)
66-
--> $DIR/macros-nonfatal-errors.rs:38:5
65+
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
66+
--> $DIR/macros-nonfatal-errors.rs:27:5
6767
|
6868
LL | include_str!("i'd be quite surprised if a file with this name existed"); //~ ERROR
6969
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7070

7171
error: argument must be a string literal
72-
--> $DIR/macros-nonfatal-errors.rs:39:20
72+
--> $DIR/macros-nonfatal-errors.rs:28:20
7373
|
7474
LL | include_bytes!(invalid); //~ ERROR
7575
| ^^^^^^^
7676

77-
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: No such file or directory (os error 2)
78-
--> $DIR/macros-nonfatal-errors.rs:40:5
77+
error: couldn't read $DIR/i'd be quite surprised if a file with this name existed: $FILE_NOT_FOUND_MSG (os error 2)
78+
--> $DIR/macros-nonfatal-errors.rs:29:5
7979
|
8080
LL | include_bytes!("i'd be quite surprised if a file with this name existed"); //~ ERROR
8181
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8282

8383
error: trace_macros! accepts only `true` or `false`
84-
--> $DIR/macros-nonfatal-errors.rs:42:5
84+
--> $DIR/macros-nonfatal-errors.rs:31:5
8585
|
8686
LL | trace_macros!(invalid); //~ ERROR
8787
| ^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)