From df1ac7aa63ea89a067c57663eab035f7b83f6933 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Tue, 3 Feb 2015 20:11:38 +1100 Subject: 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] --- src/libsyntax/ext/deriving/rand.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libsyntax') 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(cx: &mut ExtCtxt, push: F) where F: FnOnce(P), { + 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(), -- cgit 1.4.1-3-g733a5