Skip to content

Commit be293d5

Browse files
committed
Update READMEs regarding rand_derive
1 parent cf07193 commit be293d5

File tree

2 files changed

+5
-30
lines changed

2 files changed

+5
-30
lines changed

README.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -108,34 +108,6 @@ cargo bench
108108
cargo test --benches
109109
```
110110

111-
# `derive(Rand)`
112-
113-
You can derive the `Rand` trait for your custom type via the `#[derive(Rand)]`
114-
directive. To use this first add this to your Cargo.toml:
115-
116-
```toml
117-
rand = "0.4"
118-
rand_derive = "0.3"
119-
```
120-
121-
Next in your crate:
122-
123-
```rust
124-
extern crate rand;
125-
#[macro_use]
126-
extern crate rand_derive;
127-
128-
#[derive(Rand, Debug)]
129-
struct MyStruct {
130-
a: i32,
131-
b: u32,
132-
}
133-
134-
fn main() {
135-
println!("{:?}", rand::random::<MyStruct>());
136-
}
137-
```
138-
139111

140112
# License
141113

rand-derive/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
2-
rand_macros
1+
rand_derive
32
====
43

54
`#[derive(Rand)]` functionality for the `rand::Rand` trait.
65

6+
**This module is deprecated as of rand 0.5**, due in part to breaking changes
7+
in rand and in part to lack of use. Code is preserved because in theory it
8+
should be straightforward to modify for use with rand's new distribution code.
9+
710
## Usage
811
Add this to your `Cargo.toml`:
912

0 commit comments

Comments
 (0)