diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-02-19 02:49:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-19 02:49:08 +0100 |
| commit | 30f39fee9ddaacbe0dc0a62b5a7fef6338a90a00 (patch) | |
| tree | 42475839b09338a40ebf58f52595dd862b0d1608 /src/test/ui/issues | |
| parent | f8b61d852c2de4632278322d6d00a7f066277e14 (diff) | |
| parent | 4a8816512477513f57986685738cd065e72c4908 (diff) | |
Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011
ast: Keep expansion status for out-of-line module items I.e. whether a module `mod foo;` is already loaded from a file or not. This is a pre-requisite to correctly treating inner attributes on such modules (https://github.com/rust-lang/rust/issues/81661). With this change AST structures for `mod` items diverge even more for AST structure for the crate root, which previously used `ast::Mod`. Therefore this PR removes `ast::Mod` from `ast::Crate` in the first commit, these two things are sufficiently different from each other, at least at syntactic level. Customization points for visiting a "`mod` item or crate root" were also removed from AST visitors (`fn visit_mod`). `ast::Mod` itself was refactored away in the second commit in favor of `ItemKind::Mod(Unsafe, ModKind)`.
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-49040.stderr | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/ui/issues/issue-49040.stderr b/src/test/ui/issues/issue-49040.stderr index 4134d6aa544..56befe3a0a7 100644 --- a/src/test/ui/issues/issue-49040.stderr +++ b/src/test/ui/issues/issue-49040.stderr @@ -7,10 +7,8 @@ LL | #![allow(unused_variables)]; error[E0601]: `main` function not found in crate `issue_49040` --> $DIR/issue-49040.rs:1:1 | -LL | / #![allow(unused_variables)]; -LL | | -LL | | fn foo() {} - | |__^ consider adding a `main` function to `$DIR/issue-49040.rs` +LL | #![allow(unused_variables)]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider adding a `main` function to `$DIR/issue-49040.rs` error: aborting due to 2 previous errors |
