expand: Introduce enum for module loading errors and make module loading speculative
This commit is contained in:
parent
1e1d574aea
commit
1fe2eb83ec
6 changed files with 91 additions and 92 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
macro_rules! mod_decl {
|
||||
($i:ident) => {
|
||||
mod $i; //~ ERROR Cannot declare a non-inline module inside a block
|
||||
mod $i; //~ ERROR cannot declare a non-inline module inside a block
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: Cannot declare a non-inline module inside a block unless it has a path attribute
|
||||
error: cannot declare a non-inline module inside a block unless it has a path attribute
|
||||
--> $DIR/macro-expanded-mod.rs:5:9
|
||||
|
|
||||
LL | mod $i;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Test that non-inline modules are not allowed inside blocks.
|
||||
|
||||
fn main() {
|
||||
mod foo; //~ ERROR Cannot declare a non-inline module inside a block
|
||||
mod foo; //~ ERROR cannot declare a non-inline module inside a block
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: Cannot declare a non-inline module inside a block unless it has a path attribute
|
||||
error: cannot declare a non-inline module inside a block unless it has a path attribute
|
||||
--> $DIR/non-inline-mod-restriction.rs:4:5
|
||||
|
|
||||
LL | mod foo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue