about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-01 16:58:26 +0000
committerbors <bors@rust-lang.org>2018-05-01 16:58:26 +0000
commit4d7bbdd82682b0c4891538b241f7fe584f148710 (patch)
tree089c1873a3bd93999ae79b3728e20d282e5d7fd1 /src/test/incremental/thinlto
parent0d8321b5e87c87aa4dbea729b4dd722740fac645 (diff)
parentc1492fe3039d014809960f91b2a95fe30e5d6b9c (diff)
downloadrust-4d7bbdd82682b0c4891538b241f7fe584f148710.tar.gz
rust-4d7bbdd82682b0c4891538b241f7fe584f148710.zip
Auto merge of #49789 - petrochenkov:prelext, r=nikomatsakis
Module experiments: Add one more prelude layer for extern crate names passed with `--extern`

Implements one item from https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/183

When some name is looked up in lexical scope (`name`, i.e. not module-relative scope `some_mod::name` or `::name`), it's searched roughly in the next order:
- local variables
- items in unnamed blocks
- items in the current module
- :sparkles: NEW! :sparkles: crate names passed with `--extern` ("extern prelude")
- standard library prelude (`Vec`, `drop`)
- language prelude (built-in types like `u8`, `str`, etc)

The last two layers contain a limited set of names controlled by us and not arbitrary user-defined names like upper layers. We want to be able to add new names into these two layers without breaking user code, so "extern prelude" names have higher priority than std prelude and built-in types.
This is a one-time breaking change, that's why it would be nice to run this through crater.
Practical impact is expected to be minimal though due to stylistic reasons (there are not many `Uppercase` crates) and due to the way how primitive types are resolved (https://github.com/rust-lang/rust/pull/32131).
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions