about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/module.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-08 01:15:50 +0000
committerbors <bors@rust-lang.org>2019-11-08 01:15:50 +0000
commitd2574403b31508be9cfed468e352467043d2354d (patch)
tree7a38c5553a3ae0102ab6c304260076c696d73b1f /src/libsyntax/parse/parser/module.rs
parente8f43b72eb2596f360004f6cdf9cdde4b9e789e1 (diff)
parentee459c6200c6384ac83ffd7f33de12f123134c30 (diff)
downloadrust-d2574403b31508be9cfed468e352467043d2354d.tar.gz
rust-d2574403b31508be9cfed468e352467043d2354d.zip
Auto merge of #64882 - ehuss:stabilize-bare-extern, r=eddyb
Stabilize --extern flag without a path.

This stabilizes the `--extern` flag without a path, implemented in #54116.

This flag is used to add a crate that may be found in the search path to the extern prelude. The intent of stabilizing this now is to change Cargo to emit this flag for `proc_macro` when building a proc-macro crate. This will allow the ability to elide `extern crate proc_macro;` for proc-macros, one of the few places where it is still necessary.

It is intended that Cargo may also use this flag for other cases in the future as part of the [std-aware work](https://github.com/rust-lang/wg-cargo-std-aware/). There will likely be some kind of syntax where users may declare dependencies on other crates (such as `alloc`), and Cargo will use this flag so that they may be used like any other crate. At this time there are no short-term plans to use it for anything other than proc-macro.

This will not help for non-proc-macro crates that use `proc_macro`, which I believe is not too common?

An alternate approach for proc-macro is to use the `meta` crate, but from my inquiries there doesn't appear to be anyone interested in pushing that forward. The `meta` crate also doesn't help with things like `alloc` or `test`.

cc #57288
Diffstat (limited to 'src/libsyntax/parse/parser/module.rs')
0 files changed, 0 insertions, 0 deletions