diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-18 18:03:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-18 18:03:38 +0100 |
| commit | 23b79d83f2472bb310b4bb53f0bccbbaaab00044 (patch) | |
| tree | 1aad9e4566ff054c84f47e46f78c45fd5fb4c044 /src/test/ui/error-codes | |
| parent | 4118ff61ec71a2b9869422ef1762b21051ce5e40 (diff) | |
| parent | 8caf688844e1c4ba3f3d554488efca7d0994b2b1 (diff) | |
Rollup merge of #69838 - Centril:expand-module, r=petrochenkov
Expansion-driven outline module parsing
After this PR, the parser will not do any conditional compilation or loading of external module files when `mod foo;` is encountered. Instead, the parser only leaves `mod foo;` in place in the AST, with no items filled in. Expansion later kicks in and will load the actual files and do the parsing. This entails that the following is now valid:
```rust
#[cfg(FALSE)]
mod foo {
mod bar {
mod baz; // `foo/bar/baz.rs` doesn't exist, but no error!
}
}
```
Fixes https://github.com/rust-lang/rust/issues/64197.
r? @petrochenkov
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0583.stderr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0583.stderr b/src/test/ui/error-codes/E0583.stderr index 5d47b633e78..dbe70035595 100644 --- a/src/test/ui/error-codes/E0583.stderr +++ b/src/test/ui/error-codes/E0583.stderr @@ -1,8 +1,8 @@ error[E0583]: file not found for module `module_that_doesnt_exist` - --> $DIR/E0583.rs:1:5 + --> $DIR/E0583.rs:1:1 | LL | mod module_that_doesnt_exist; - | ^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: to create the module `module_that_doesnt_exist`, create file "$DIR/module_that_doesnt_exist.rs" |
