Skip to content

Commit cd618a9

Browse files
committed
Merge missing_non_modrs with modules
1 parent aa97acc commit cd618a9

File tree

9 files changed

+16
-20
lines changed

9 files changed

+16
-20
lines changed

tests/ui/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -939,12 +939,6 @@ Something is missing which could be added to fix (e.g. suggestions).
939939

940940
**FIXME**: this is way too vague, tests should be rehomed.
941941

942-
## `tests/ui/missing_non_modrs_mod/`
943-
944-
This directory is a small tree of `mod` dependencies, but the root, `foo.rs`, is looking for a file which does not exist. The test checks that the error is reported at the top-level module.
945-
946-
**FIXME**: Merge with `tests/ui/modules/`.
947-
948942
## `tests/ui/missing-trait-bounds/`
949943

950944
Tests for checking missing trait bounds, and their diagnostics.

tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//@ ignore-auxiliary (used by `./missing_non_modrs_mod.rs`)
2-
2+
// looking for a file which does not exist.
33
mod missing;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ ignore-auxiliary (used by `./missing_non_modrs_mod_inline.rs`)
2-
2+
// looking for a file which does not exist.
33
mod inline {
44
mod missing;
55
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//! Tests the error reporting when a declared module file is missing.
2+
mod missing_mod;
3+
fn main() {}
4+
5+
//~? ERROR file not found for module `missing`

tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr renamed to tests/ui/modules/missing_non_modrs_mod.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0583]: file not found for module `missing`
2-
--> $DIR/foo.rs:3:1
2+
--> $DIR/missing_mod.rs:3:1
33
|
44
LL | mod missing;
55
| ^^^^^^^^^^^^
66
|
7-
= help: to create the module `missing`, create file "$DIR/foo/missing.rs" or "$DIR/foo/missing/mod.rs"
7+
= help: to create the module `missing`, create file "$DIR/missing_mod/missing.rs" or "$DIR/missing_mod/missing/mod.rs"
88
= note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
99

1010
error: aborting due to 1 previous error
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//! Tests the error reporting when a declared module file is missing.
2+
mod missing_mod_inline;
3+
fn main() {}
4+
5+
//~? ERROR file not found for module `missing`

tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr renamed to tests/ui/modules/missing_non_modrs_mod_inline.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
error[E0583]: file not found for module `missing`
2-
--> $DIR/foo_inline.rs:4:5
2+
--> $DIR/missing_mod_inline.rs:4:5
33
|
44
LL | mod missing;
55
| ^^^^^^^^^^^^
66
|
7-
= help: to create the module `missing`, create file "$DIR/foo_inline/inline/missing.rs" or "$DIR/foo_inline/inline/missing/mod.rs"
7+
= help: to create the module `missing`, create file "$DIR/missing_mod_inline/inline/missing.rs" or "$DIR/missing_mod_inline/inline/missing/mod.rs"
88
= note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
99

1010
error: aborting due to 1 previous error

0 commit comments

Comments
 (0)