rust/src/libsyntax/ext
Patrick Walton 7f928d150e librustc: Forbid external crates, imports, and/or items from being
declared with the same name in the same scope.

This breaks several common patterns. First are unused imports:

    use foo::bar;
    use baz::bar;

Change this code to the following:

    use baz::bar;

Second, this patch breaks globs that import names that are shadowed by
subsequent imports. For example:

    use foo::*; // including `bar`
    use baz::bar;

Change this code to remove the glob:

    use foo::{boo, quux};
    use baz::bar;

Or qualify all uses of `bar`:

    use foo::{boo, quux};
    use baz;

    ... baz::bar ...

Finally, this patch breaks code that, at top level, explicitly imports
`std` and doesn't disable the prelude.

    extern crate std;

Because the prelude imports `std` implicitly, there is no need to
explicitly import it; just remove such directives.

The old behavior can be opted into via the `import_shadowing` feature
gate. Use of this feature gate is discouraged.

This implements RFC #116.

Closes #16464.

[breaking-change]
2014-08-16 19:32:25 -07:00
..
deriving librustc: Forbid external crates, imports, and/or items from being 2014-08-16 19:32:25 -07:00
tt Add a ton of ignore-lexer-test 2014-07-21 18:38:40 -07:00
asm.rs
base.rs AST refactoring: merge PatWild and PatWildMulti into one variant with a flag. 2014-08-06 17:04:44 +02:00
build.rs librustc: Parse, but do not fully turn on, the ref keyword for 2014-08-13 18:09:14 -07:00
bytes.rs Fixes missing overflow lint for i64 #14269 2014-08-05 09:59:03 +02:00
cfg.rs
concat_idents.rs
concat.rs Fixes missing overflow lint for i64 #14269 2014-08-05 09:59:03 +02:00
env.rs
expand.rs librustc: Parse, but do not fully turn on, the ref keyword for 2014-08-13 18:09:14 -07:00
fmt.rs
format.rs auto merge of #15871 : dotdash/rust/unnamed_fmtstr, r=pcwalton 2014-07-22 09:01:17 +00:00
log_syntax.rs
mtwt.rs
quote.rs quote_expr macro: embed Ident using special encoding that preserves hygiene. 2014-08-13 17:40:15 +02:00
source_util.rs
trace_macros.rs