diff options
| author | bors <bors@rust-lang.org> | 2014-05-19 06:11:33 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-19 06:11:33 -0700 |
| commit | ed156772bd95b8d621d50102922e5f5ac886d4a1 (patch) | |
| tree | 117279b581c3b49419866e5916d94ec26de9a0f9 /src/rustllvm/RustWrapper.cpp | |
| parent | 5d2edddc304a7cd8c95ba8b0beb06f0b4ebaca37 (diff) | |
| parent | 4e9e091e91ea2ad8a6f45a9b20ff331d4bca7a23 (diff) | |
| download | rust-ed156772bd95b8d621d50102922e5f5ac886d4a1.tar.gz rust-ed156772bd95b8d621d50102922e5f5ac886d4a1.zip | |
auto merge of #14251 : alexcrichton/rust/hierarchy, r=huonw
This is an implementation of RFC 16. A module can now only be loaded if the
module declaring `mod name;` "owns" the current directory. A module is
considered as owning its directory if it meets one of the following criteria:
* It is the top-level crate file
* It is a `mod.rs` file
* It was loaded via `#[path]`
* It was loaded via `include!`
* The module was declared via an inline `mod foo { ... }` statement
For example, this directory structure is now invalid
// lib.rs
mod foo;
// foo.rs
mod bar;
// bar.rs;
fn bar() {}
With this change `foo.rs` must be renamed to `foo/mod.rs`, and `bar.rs` must be
renamed to `foo/bar.rs`. This makes it clear that `bar` is a submodule of `foo`,
and can only be accessed through `foo`.
RFC: 0016-module-file-system-hierarchy
Closes #14180
[breaking-change]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
