Report errors better when failing to open files for sub-parsers
This commit is contained in:
parent
72cc1aca17
commit
74b2e99797
6 changed files with 72 additions and 25 deletions
5
src/test/compile-fail/mod_file_not_exist.rs
Normal file
5
src/test/compile-fail/mod_file_not_exist.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
mod not_a_real_file; //~ ERROR not_a_real_file.rs
|
||||
|
||||
fn main() {
|
||||
assert mod_file_aux::bar() == 10;
|
||||
}
|
||||
6
src/test/compile-fail/mod_file_with_path_attr.rs
Normal file
6
src/test/compile-fail/mod_file_with_path_attr.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#[path = "not_a_real_file.rs"]
|
||||
mod m; //~ ERROR not_a_real_file.rs
|
||||
|
||||
fn main() {
|
||||
assert m::foo() == 10;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue