about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2015-02-03 20:11:38 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2015-02-04 09:39:40 +1100
commitdf1ac7aa63ea89a067c57663eab035f7b83f6933 (patch)
treef053537b23c43f7e1badcc0409e740202461bb9b /src/libsyntax
parenteaf4c5c784637f3df8bdebc6ec21dbd4bc69420a (diff)
downloadrust-df1ac7aa63ea89a067c57663eab035f7b83f6933.tar.gz
rust-df1ac7aa63ea89a067c57663eab035f7b83f6933.zip
Deprecate in-tree `rand`, `std::rand` and `#[derive(Rand)]`.
Use the crates.io crate `rand` (version 0.1 should be a drop in
replacement for `std::rand`) and `rand_macros` (`#[derive_Rand]` should
be a drop-in replacement).

[breaking-change]
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/deriving/rand.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/ext/deriving/rand.rs b/src/libsyntax/ext/deriving/rand.rs
index 9fd5091e194..ec6eb9bee61 100644
--- a/src/libsyntax/ext/deriving/rand.rs
+++ b/src/libsyntax/ext/deriving/rand.rs
@@ -24,6 +24,10 @@ pub fn expand_deriving_rand<F>(cx: &mut ExtCtxt,
                                push: F) where
     F: FnOnce(P<Item>),
 {
+    cx.span_warn(span,
+                 "`#[derive(Rand)]` is deprecated in favour of `#[derive_Rand]` from \
+                  `rand_macros` on crates.io");
+
     let trait_def = TraitDef {
         span: span,
         attributes: Vec::new(),