rust/src/libsyntax/parse
bors ed156772bd 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]
2014-05-19 06:11:33 -07:00
..
attr.rs Remove comment about semicolons for inner attributes from docs and adjust comments. 2014-05-03 21:24:06 +01:00
classify.rs Fix repeated module documentation 2014-04-27 22:17:49 -04:00
comments.rs libsyntax: Remove uses of ~str from libsyntax, and fix fallout 2014-05-08 08:38:23 -07:00
common.rs Fix repeated module documentation 2014-04-27 22:17:49 -04:00
lexer.rs libsyntax: Remove uses of ~str from libsyntax, and fix fallout 2014-05-08 08:38:23 -07:00
mod.rs syntax: Tighten search paths for inner modules 2014-05-17 01:01:47 -07:00
obsolete.rs libsyntax: Remove uses of ~str from libsyntax, and fix fallout 2014-05-08 08:38:23 -07:00
parser.rs syntax: Tighten search paths for inner modules 2014-05-17 01:01:47 -07:00
token.rs libserialize: Remove all uses of ~str from libserialize. 2014-05-16 11:41:27 -07:00