about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-11-11 12:32:01 +0800
committerkennytm <kennytm@gmail.com>2018-11-11 12:32:01 +0800
commit75e920f847557acef9b6f5425262ea5dc72ed685 (patch)
tree217542ec027f7a5cbca1a37d7903e2ba447deda6 /src/liballoc
parent17ae50765ea73e2cd05c152f235f3e41efa5f518 (diff)
parent9ed9d6d0d09a690e81841f1fc2e02f16bc9ee2c5 (diff)
downloadrust-75e920f847557acef9b6f5425262ea5dc72ed685.tar.gz
rust-75e920f847557acef9b6f5425262ea5dc72ed685.zip
Rollup merge of #55630 - petrochenkov:noprelude, r=Centril
resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition

This is a tiny thing.
For historical reasons macro prelude (macros from `#[macro_use] extern crate ...`, including `extern crate std`) is still available in modules with `#[no_implicit_prelude]`.
This PR provides proper isolation and removes those names from scope.

`#[no_implicit_prelude]` modules still have built-in types (`u8`), built-in attributes (`#[inline]`) and built-in macros (`env!("PATH")`) in scope. We can introduce some `#[no_implicit_prelude_at_all]` to remove those as well, but that's a separate issue.

The change is done only on 2018 edition for backward compatibility.
I'm pretty sure this can be done on 2015 as well because `#[no_implicit_prelude]` is rarely used, but I don't want to go through the crater/deprecation process right now, maybe later.

cc https://github.com/rust-lang/rust/issues/53977
r? @ghost
Diffstat (limited to 'src/liballoc')
0 files changed, 0 insertions, 0 deletions