diff options
| author | Jack Moffitt <jack@metajack.im> | 2013-12-09 14:56:53 -0700 |
|---|---|---|
| committer | Jack Moffitt <jack@metajack.im> | 2013-12-10 17:04:24 -0700 |
| commit | b349036e5f4f5f42e34ae9dd7859f3dc7a79de94 (patch) | |
| tree | c11b022d85120eddff8bdf1be2fd36fe3939369f /src/libstd | |
| parent | 29ca4350c8d64facb39311660e8ee919766f481a (diff) | |
| download | rust-b349036e5f4f5f42e34ae9dd7859f3dc7a79de94.tar.gz rust-b349036e5f4f5f42e34ae9dd7859f3dc7a79de94.zip | |
Make crate hash stable and externally computable.
This replaces the link meta attributes with a pkgid attribute and uses a hash of this as the crate hash. This makes the crate hash computable by things other than the Rust compiler. It also switches the hash function ot SHA1 since that is much more likely to be available in shell, Python, etc than SipHash. Fixes #10188, #8523.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/sched.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 6fe757976f0..e2674006215 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -43,6 +43,8 @@ //! //! use std::prelude::*; +#[pkgid="std#0.9-pre"]; +// NOTE: remove after the next snapshot #[link(name = "std", package_id = "std", vers = "0.9-pre", @@ -69,13 +71,13 @@ // When testing libstd, bring in libuv as the I/O backend so tests can print // things and all of the std::io tests have an I/O interface to run on top // of -#[cfg(test)] extern mod rustuv(vers = "0.9-pre"); +#[cfg(test)] extern mod rustuv = "rustuv#0.9-pre"; // Make extra accessible for benchmarking -#[cfg(test)] extern mod extra(vers = "0.9-pre"); +#[cfg(test)] extern mod extra = "extra#0.9-pre"; // Make std testable by not duplicating lang items. See #2912 -#[cfg(test)] extern mod realstd(name = "std"); +#[cfg(test)] extern mod realstd = "std#0.9-pre"; #[cfg(test)] pub use kinds = realstd::kinds; #[cfg(test)] pub use ops = realstd::ops; #[cfg(test)] pub use cmp = realstd::cmp; diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs index 5ad1d92fb15..eb5b2df4ed9 100644 --- a/src/libstd/rt/sched.rs +++ b/src/libstd/rt/sched.rs @@ -917,8 +917,6 @@ fn new_sched_rng() -> XorShiftRng { #[cfg(test)] mod test { - extern mod extra; - use prelude::*; use rt::test::*; use unstable::run_in_bare_thread; |
