rust/src/test
bors bcfd5c48b7 Auto merge of #40501 - jseyfried:shadow_builtin_macros, r=nrc
Allow `use` macro imports to shadow global macros

Terminology:
 - global scope: builtin macros, macros from the prelude, `#[macro_use]`, or `#![plugin(..)]`.
 - legacy scope: crate-local `macro_rules!`.
 - modern scope: `use` macro imports, `macro` (once implemented).

Today, the legacy scope can shadow the global scope (modulo RFC 1560 expanded shadowing restrictions). However, the modern scope cannot shadow or be shadowed by either the global or legacy scopes, leading to ambiguity errors.

This PR allows the modern scope to shadow the global scope (subject to some restrictions).
More specifically, a name in the global scope is as shadowable as a glob import in the module `self`. In other words, we imagine a special, implicit glob import in each module item:
```rust
mod foo {
    #[lexical_only] // Not accessible via `foo::<name>`, like pre-RFC 1560 `use` imports.
    #[shadowable_by_legacy_scope] // for back-compat
    use <global_macros>::*;
}
```

r? @nrc
2017-03-26 11:45:13 +00:00
..
codegen rustc: Always emit the uwtable attribute on Windows 2017-03-21 16:47:10 -04:00
codegen-units translate drop glue using MIR 2017-03-18 02:53:08 +02:00
compile-fail Auto merge of #40501 - jseyfried:shadow_builtin_macros, r=nrc 2017-03-26 11:45:13 +00:00
compile-fail-fulldeps Rollup merge of #40556 - cramertj:stabilize-pub-restricted, r=petrochenkov 2017-03-20 23:44:59 -04:00
debuginfo update gdbr tests 2017-03-09 22:12:36 +01:00
incremental rustc_typeck: hook up collect and item/body check to on-demand. 2017-02-25 18:35:25 +02:00
mir-opt Do not bother creating StorageLive for TyNever 2017-03-09 17:54:00 +02:00
parse-fail Refactor parsing of trait object types 2017-03-21 23:01:53 +03:00
pretty Update pretty test for derive attributes 2017-02-05 12:22:29 +10:30
run-fail Warn when a #[should_panic] test has an unexpected message 2016-11-18 21:01:19 +10:30
run-fail-fulldeps Fix fallout in rustdoc and tests. 2016-11-21 12:16:46 +00:00
run-make Regression test for rust-lang/rust#40535 2017-03-21 16:34:56 -04:00
run-pass Auto merge of #40347 - alexcrichton:rm-liblog, r=brson 2017-03-26 04:26:22 +00:00
run-pass-fulldeps Remove internal liblog 2017-03-23 11:28:00 -07:00
run-pass-valgrind Removes FIXMEs related to #22405 2017-01-31 21:27:13 -05:00
rustdoc Add whitespace around "=" in assoc items 2017-03-21 16:22:15 -04:00
ui Add diagnostic for incorrect pub (restriction) 2017-03-22 22:51:45 -07:00
ui-fulldeps/custom-derive Separate "ui-fulldeps" tests from "ui" tests 2017-03-04 21:38:26 +03:00
COMPILER_TESTS.md Move COMPILER_TESTS.md out of the root directory 2017-02-25 00:13:00 -06:00