diff options
| author | bors <bors@rust-lang.org> | 2016-11-21 21:15:48 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-21 21:15:48 -0600 |
| commit | 1c11ea3aedebac562f5125e1cf22ac56a3a8993c (patch) | |
| tree | 1180560b8f50cc12c6476116044567d0a4a6b097 /src/rustllvm/RustWrapper.cpp | |
| parent | 82d8833a456a408fe8b761a3b5e88475b65066c8 (diff) | |
| parent | fa8c53bae4592395565fc3c06cdcc093fc4b0dbe (diff) | |
| download | rust-1c11ea3aedebac562f5125e1cf22ac56a3a8993c.tar.gz rust-1c11ea3aedebac562f5125e1cf22ac56a3a8993c.zip | |
Auto merge of #37602 - jseyfried:directory_ownership, r=nikomatsakis
parser: simplify directory ownership semantics This PR simplifies the semantics of "directory ownership". After this PR, - a non-inline module without a `#[path]` attribute (e.g. `mod foo;`) is allowed iff its parent module/block (whichever is nearer) is a directory owner, - an non-inline module is a directory owner iff its corresponding file is named `mod.rs` (c.f. [comment](https://github.com/rust-lang/rust/issues/32401#issuecomment-201021902)), - a block is never a directory owner (c.f. #31534), and - an inline module is a directory owner iff either - its parent module/block is a directory owner (again, c.f. #31534), or - it has a `#[path]` attribute (c.f. #36789). These semantics differ from today's in three orthogonal ways: - `#[path = "foo.rs"] mod foo;` is no longer a directory owner. This is a [breaking-change]. - #36789 is generalized to apply to modules that are not directory owners in addition to blocks. - A macro-expanded non-inline module is only allowed where an ordinary non-inline module would be allowed. Today, we incorrectly allow macro-expanded non-inline modules in modules that are not directory owners (but not in blocks). This is a [breaking-change]. Fixes #32401. r? @nikomatsakis
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
