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/incremental | |
| 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/incremental')
| -rw-r--r-- | src/test/incremental/change_symbol_export_status.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/incremental/change_symbol_export_status.rs b/src/test/incremental/change_symbol_export_status.rs index f3de46d99dd..9b3b381d621 100644 --- a/src/test/incremental/change_symbol_export_status.rs +++ b/src/test/incremental/change_symbol_export_status.rs @@ -2,10 +2,8 @@ // compile-flags: -Zquery-dep-graph #![feature(rustc_attrs)] -#![allow(private_no_mangle_fns)] - -#![rustc_partition_codegened(module="change_symbol_export_status-mod1", cfg="rpass2")] -#![rustc_partition_reused(module="change_symbol_export_status-mod2", cfg="rpass2")] +#![rustc_partition_codegened(module = "change_symbol_export_status-mod1", cfg = "rpass2")] +#![rustc_partition_reused(module = "change_symbol_export_status-mod2", cfg = "rpass2")] // This test case makes sure that a change in symbol visibility is detected by // our dependency tracking. We do this by changing a module's visibility to |
