mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Restrict sysroot crate imports to those defined in this repo.
It's common to import dependencies from the sysroot via `extern crate` rather than use an explicit cargo dependency, when it's necessary to use the same dependency version as used by rustc itself. However, this is dangerous for crates.io crates, since rustc may not pull in the dependency on some targets, or may pull in multiple versions. In both cases, the `extern crate` fails to resolve. To address this, re-export all such dependencies from the appropriate `rustc_*` crates, and use this alias from crates which would otherwise need to use `extern crate`.
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
pub use atomic_ref::AtomicRef;
|
||||
pub use ena::{snapshot_vec, undo_log, unify};
|
||||
pub use rustc_index::static_assert_size;
|
||||
// Re-export some data-structure crates which are part of our public API.
|
||||
pub use {either, indexmap, smallvec, thin_vec};
|
||||
|
||||
pub mod aligned;
|
||||
pub mod base_n;
|
||||
|
||||
Reference in New Issue
Block a user