Skip to content

Commit 76801d9

Browse files
committed
Fixed 'no such file or directory' mismatch between Windows and Linux.
1 parent 0b09a85 commit 76801d9

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
12+
// ignore-tidy-linelength
13+
1114
#![feature(external_doc)]
1215

1316
#[doc(include = "not-a-file.md")] //~ ERROR: couldn't read

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

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// normalize-stderr-test: "The system cannot find the file specified\." -> "No such file or directory"
12+
// ignore-tidy-linelength
13+
1114
// test that errors in a (selection) of macros don't kill compilation
1215
// immediately, so that we get more errors listed at a time.
1316

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

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

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

1313
error: concat_idents! requires ident args.
14-
--> $DIR/macros-nonfatal-errors.rs:23:5
14+
--> $DIR/macros-nonfatal-errors.rs:26: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:25:17
20+
--> $DIR/macros-nonfatal-errors.rs:28:17
2121
|
2222
LL | option_env!(invalid); //~ ERROR
2323
| ^^^^^^^
2424

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

3131
error: expected string literal
32-
--> $DIR/macros-nonfatal-errors.rs:27:10
32+
--> $DIR/macros-nonfatal-errors.rs:30: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:28:5
38+
--> $DIR/macros-nonfatal-errors.rs:31:5
3939
|
4040
LL | env!("RUST_HOPEFULLY_THIS_DOESNT_EXIST"); //~ ERROR
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
error[E0658]: non-ident macro paths are experimental (see issue #35896)
44-
--> $DIR/macros-nonfatal-errors.rs:30:5
44+
--> $DIR/macros-nonfatal-errors.rs:33:5
4545
|
4646
LL | foo::blah!(); //~ ERROR
4747
| ^^^^^^^^^
4848
|
4949
= help: add #![feature(use_extern_macros)] to the crate attributes to enable
5050

5151
error: format argument must be a string literal
52-
--> $DIR/macros-nonfatal-errors.rs:32:13
52+
--> $DIR/macros-nonfatal-errors.rs:35:13
5353
|
5454
LL | format!(invalid); //~ ERROR
5555
| ^^^^^^^
@@ -59,37 +59,37 @@ LL | format!("{}", invalid); //~ ERROR
5959
| ^^^^^
6060

6161
error: argument must be a string literal
62-
--> $DIR/macros-nonfatal-errors.rs:34:14
62+
--> $DIR/macros-nonfatal-errors.rs:37:14
6363
|
6464
LL | include!(invalid); //~ ERROR
6565
| ^^^^^^^
6666

6767
error: argument must be a string literal
68-
--> $DIR/macros-nonfatal-errors.rs:36:18
68+
--> $DIR/macros-nonfatal-errors.rs:39:18
6969
|
7070
LL | include_str!(invalid); //~ ERROR
7171
| ^^^^^^^
7272

7373
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)
74-
--> $DIR/macros-nonfatal-errors.rs:37:5
74+
--> $DIR/macros-nonfatal-errors.rs:40:5
7575
|
7676
LL | include_str!("i'd be quite surprised if a file with this name existed"); //~ ERROR
7777
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7878

7979
error: argument must be a string literal
80-
--> $DIR/macros-nonfatal-errors.rs:38:20
80+
--> $DIR/macros-nonfatal-errors.rs:41:20
8181
|
8282
LL | include_bytes!(invalid); //~ ERROR
8383
| ^^^^^^^
8484

8585
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)
86-
--> $DIR/macros-nonfatal-errors.rs:39:5
86+
--> $DIR/macros-nonfatal-errors.rs:42:5
8787
|
8888
LL | include_bytes!("i'd be quite surprised if a file with this name existed"); //~ ERROR
8989
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9090

9191
error: trace_macros! accepts only `true` or `false`
92-
--> $DIR/macros-nonfatal-errors.rs:41:5
92+
--> $DIR/macros-nonfatal-errors.rs:44:5
9393
|
9494
LL | trace_macros!(invalid); //~ ERROR
9595
| ^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)