Skip to content

Commit 642a43a

Browse files
committed
Test crate loading error stderr
And remove E0464 from test-exemption list, since it now has a full test.
1 parent 6792c6a commit 642a43a

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed
+5-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
// dont-check-compiler-stderr
21
// aux-build:crateresolve1-1.rs
32
// aux-build:crateresolve1-2.rs
43
// aux-build:crateresolve1-3.rs
5-
// error-pattern:multiple matching crates for `crateresolve1`
4+
5+
// normalize-stderr-test: "\.nll/" -> "/"
6+
// normalize-stderr-test: "\\\?\\" -> ""
7+
// normalize-stderr-test: "libcrateresolve1-([123])\.[a-z]+" -> "libcrateresolve1-$1.somelib"
68

79
extern crate crateresolve1;
10+
//~^ ERROR multiple matching crates for `crateresolve1`
811

912
fn main() {
1013
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0464]: multiple matching crates for `crateresolve1`
2+
--> $DIR/crateresolve1.rs:9:1
3+
|
4+
LL | extern crate crateresolve1;
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: candidates:
8+
crate `crateresolve1`: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-1.somelib
9+
crate `crateresolve1`: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-2.somelib
10+
crate `crateresolve1`: $TEST_BUILD_DIR/crate-loading/crateresolve1/auxiliary/libcrateresolve1-3.somelib
11+
12+
error: aborting due to previous error
13+

src/tools/tidy/src/error_codes_check.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use regex::Regex;
1010

1111
// A few of those error codes can't be tested but all the others can and *should* be tested!
1212
const EXEMPTED_FROM_TEST: &[&str] = &[
13-
"E0227", "E0279", "E0280", "E0313", "E0377", "E0461", "E0462", "E0464", "E0465", "E0476",
14-
"E0514", "E0519", "E0523", "E0554", "E0640", "E0717", "E0729",
13+
"E0227", "E0279", "E0280", "E0313", "E0377", "E0461", "E0462", "E0465", "E0476", "E0514",
14+
"E0519", "E0523", "E0554", "E0640", "E0717", "E0729",
1515
];
1616

1717
// Some error codes don't have any tests apparently...

0 commit comments

Comments
 (0)