diff options
| author | bors <bors@rust-lang.org> | 2019-01-14 23:00:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-14 23:00:50 +0000 |
| commit | aea9f0aa976db2f5de28be3b6b287c6889cd926b (patch) | |
| tree | 1f45e79c5694619f8b0ea8a4652abce5a2c49a52 /src/doc | |
| parent | 03acbd71c977cd63ce5f39ba9b6fe9ffd578785a (diff) | |
| parent | 8a62e393b8fba95e989020f2efbf846ca02113f9 (diff) | |
| download | rust-aea9f0aa976db2f5de28be3b6b287c6889cd926b.tar.gz rust-aea9f0aa976db2f5de28be3b6b287c6889cd926b.zip | |
Auto merge of #57607 - Centril:rollup, r=Centril
Rollup of 8 pull requests Successful merges: - #57043 (Fix poor worst case performance of set intersection) - #57480 (Clean up and fix a bug in query plumbing) - #57481 (provide suggestion for invalid boolean cast) - #57540 (Modify some parser diagnostics to continue evaluating beyond the parser) - #57570 (Querify local `plugin_registrar_fn` and `proc_macro_decls_static`) - #57572 (Unaccept `extern_in_paths`) - #57585 (Recover from item trailing semicolon) - #57589 (Add a debug_assert to Vec::set_len) Failed merges: r? @ghost
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/unstable-book/src/language-features/extern-in-paths.md | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/doc/unstable-book/src/language-features/extern-in-paths.md b/src/doc/unstable-book/src/language-features/extern-in-paths.md deleted file mode 100644 index 9979d774229..00000000000 --- a/src/doc/unstable-book/src/language-features/extern-in-paths.md +++ /dev/null @@ -1,40 +0,0 @@ -# `extern_in_paths` - -The tracking issue for this feature is: [#44660] - -[#44660]: https://github.com/rust-lang/rust/issues/44660 - ------------------------- - -The `extern_in_paths` feature allows to refer to names from other crates "inline", without -introducing `extern crate` items, using keyword `extern`. - -For example, `extern::my_crat::a::b` will resolve to path `a::b` in crate `my_crate`. - -Absolute paths on 2018 edition (e.g. `::my_crate::a::b`) provide the same effect -and resolve to extern crates (built-in or passed with `--extern`). - -```rust,ignore -#![feature(extern_in_paths)] - -// Suppose we have a dependency crate `xcrate` available through `Cargo.toml`, or `--extern` -// options, or standard Rust distribution, or some other means. - -use extern::xcrate::Z; - -fn f() { - use extern::xcrate; - use extern::xcrate as ycrate; - let s = xcrate::S; - assert_eq!(format!("{:?}", s), "S"); - let z = ycrate::Z; - assert_eq!(format!("{:?}", z), "Z"); -} - -fn main() { - let s = extern::xcrate::S; - assert_eq!(format!("{:?}", s), "S"); - let z = Z; - assert_eq!(format!("{:?}", z), "Z"); -} -``` |
