Skip to content

Commit 2219e0b

Browse files
committed
Test crate loading error stderr
And remove E0464 from test-exemption list, since it now has a full test.
1 parent f2c4ecd commit 2219e0b

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
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: "\.so" -> ".dylib"
6+
// normalize-stderr-test: "\.dll" -> ".dylib"
67

78
extern crate crateresolve1;
9+
//~^ ERROR multiple matching crates for `crateresolve1`
810

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

src/tools/tidy/src/error_codes_check.rs

Lines changed: 2 additions & 2 deletions
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-
"E0482", "E0514", "E0519", "E0523", "E0554", "E0640", "E0717", "E0729",
13+
"E0227", "E0279", "E0280", "E0313", "E0377", "E0461", "E0462", "E0465", "E0476", "E0482",
14+
"E0514", "E0519", "E0523", "E0554", "E0640", "E0717", "E0729",
1515
];
1616

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

0 commit comments

Comments
 (0)