File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -120,18 +120,15 @@ impl RngCore for ThreadRng {
120
120
121
121
impl CryptoRng for ThreadRng { }
122
122
123
- /// DEPRECATED: use `thread_rng().gen()` instead.
124
- ///
125
123
/// Generates a random value using the thread-local random number generator.
126
124
///
127
125
/// This is simply a shortcut for `thread_rng().gen()`. See [`thread_rng`] for
128
- /// documentation of the entropy source and [`Rand `] for documentation of
126
+ /// documentation of the entropy source and [`Standard `] for documentation of
129
127
/// distributions and type-specific generation.
130
128
///
131
129
/// # Examples
132
130
///
133
- /// ```
134
- /// # #![allow(deprecated)]
131
+ /// ```rust
135
132
/// let x = rand::random::<u8>();
136
133
/// println!("{}", x);
137
134
///
@@ -146,7 +143,7 @@ impl CryptoRng for ThreadRng {}
146
143
/// If you're calling `random()` in a loop, caching the generator as in the
147
144
/// following example can increase performance.
148
145
///
149
- /// ```
146
+ /// ```rust
150
147
/// # #![allow(deprecated)]
151
148
/// use rand::Rng;
152
149
///
@@ -166,8 +163,7 @@ impl CryptoRng for ThreadRng {}
166
163
/// ```
167
164
///
168
165
/// [`thread_rng`]: fn.thread_rng.html
169
- /// [`Rand`]: trait.Rand.html
170
- #[ deprecated( since="0.5.0" , note="removed in favor of thread_rng().gen()" ) ]
166
+ /// [`Standard`]: distributions/struct.Standard.html
171
167
#[ inline]
172
168
pub fn random < T > ( ) -> T where Standard : Distribution < T > {
173
169
thread_rng ( ) . gen ( )
You can’t perform that action at this time.
0 commit comments