Merge missing_non_modrs with modules
This commit is contained in:
parent
aa97acce62
commit
cd618a9ccb
9 changed files with 16 additions and 20 deletions
|
|
@ -939,12 +939,6 @@ Something is missing which could be added to fix (e.g. suggestions).
|
|||
|
||||
**FIXME**: this is way too vague, tests should be rehomed.
|
||||
|
||||
## `tests/ui/missing_non_modrs_mod/`
|
||||
|
||||
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.
|
||||
|
||||
**FIXME**: Merge with `tests/ui/modules/`.
|
||||
|
||||
## `tests/ui/missing-trait-bounds/`
|
||||
|
||||
Tests for checking missing trait bounds, and their diagnostics.
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
mod foo;
|
||||
fn main() {}
|
||||
|
||||
//~? ERROR file not found for module `missing`
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
mod foo_inline;
|
||||
fn main() {}
|
||||
|
||||
//~? ERROR file not found for module `missing`
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
//@ ignore-auxiliary (used by `./missing_non_modrs_mod.rs`)
|
||||
|
||||
// looking for a file which does not exist.
|
||||
mod missing;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//@ ignore-auxiliary (used by `./missing_non_modrs_mod_inline.rs`)
|
||||
|
||||
// looking for a file which does not exist.
|
||||
mod inline {
|
||||
mod missing;
|
||||
}
|
||||
5
tests/ui/modules/missing_non_modrs_mod.rs
Normal file
5
tests/ui/modules/missing_non_modrs_mod.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
//! Tests the error reporting when a declared module file is missing.
|
||||
mod missing_mod;
|
||||
fn main() {}
|
||||
|
||||
//~? ERROR file not found for module `missing`
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
error[E0583]: file not found for module `missing`
|
||||
--> $DIR/foo.rs:3:1
|
||||
--> $DIR/missing_mod.rs:3:1
|
||||
|
|
||||
LL | mod missing;
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: to create the module `missing`, create file "$DIR/foo/missing.rs" or "$DIR/foo/missing/mod.rs"
|
||||
= help: to create the module `missing`, create file "$DIR/missing_mod/missing.rs" or "$DIR/missing_mod/missing/mod.rs"
|
||||
= note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
5
tests/ui/modules/missing_non_modrs_mod_inline.rs
Normal file
5
tests/ui/modules/missing_non_modrs_mod_inline.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
//! Tests the error reporting when a declared module file is missing.
|
||||
mod missing_mod_inline;
|
||||
fn main() {}
|
||||
|
||||
//~? ERROR file not found for module `missing`
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
error[E0583]: file not found for module `missing`
|
||||
--> $DIR/foo_inline.rs:4:5
|
||||
--> $DIR/missing_mod_inline.rs:4:5
|
||||
|
|
||||
LL | mod missing;
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: to create the module `missing`, create file "$DIR/foo_inline/inline/missing.rs" or "$DIR/foo_inline/inline/missing/mod.rs"
|
||||
= help: to create the module `missing`, create file "$DIR/missing_mod_inline/inline/missing.rs" or "$DIR/missing_mod_inline/inline/missing/mod.rs"
|
||||
= note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
Loading…
Add table
Add a link
Reference in a new issue