@@ -43,8 +43,7 @@ use crate::marker::{ConstParamTy_, UnsizedConstParamTy};
43
43
/// conversions that extend the bits of `Src` with trailing padding to fill
44
44
/// trailing uninitialized bytes of `Self`; e.g.:
45
45
///
46
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
47
- #[ cfg_attr( not( bootstrap) , doc = "```rust" ) ]
46
+ /// ```rust
48
47
/// #![feature(transmutability)]
49
48
///
50
49
/// use core::mem::{Assume, TransmuteFrom};
@@ -151,8 +150,7 @@ pub struct Assume {
151
150
/// When `false`, [`TransmuteFrom`] is not implemented for transmutations
152
151
/// that might violate the alignment requirements of references; e.g.:
153
152
///
154
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
155
- #[ cfg_attr( not( bootstrap) , doc = "```compile_fail,E0277" ) ]
153
+ /// ```compile_fail,E0277
156
154
/// #![feature(transmutability)]
157
155
/// use core::mem::{align_of, TransmuteFrom};
158
156
///
@@ -171,8 +169,7 @@ pub struct Assume {
171
169
/// that references in the transmuted value satisfy the alignment
172
170
/// requirements of their referent types; e.g.:
173
171
///
174
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
175
- #[ cfg_attr( not( bootstrap) , doc = "```rust" ) ]
172
+ /// ```rust
176
173
/// #![feature(pointer_is_aligned_to, transmutability)]
177
174
/// use core::mem::{align_of, Assume, TransmuteFrom};
178
175
///
@@ -203,8 +200,7 @@ pub struct Assume {
203
200
/// that might violate the library safety invariants of the destination
204
201
/// type; e.g.:
205
202
///
206
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
207
- #[ cfg_attr( not( bootstrap) , doc = "```compile_fail,E0277" ) ]
203
+ /// ```compile_fail,E0277
208
204
/// #![feature(transmutability)]
209
205
/// use core::mem::TransmuteFrom;
210
206
///
@@ -225,8 +221,7 @@ pub struct Assume {
225
221
/// that undefined behavior does not arise from using the transmuted value;
226
222
/// e.g.:
227
223
///
228
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
229
- #[ cfg_attr( not( bootstrap) , doc = "```rust" ) ]
224
+ /// ```rust
230
225
/// #![feature(transmutability)]
231
226
/// use core::mem::{Assume, TransmuteFrom};
232
227
///
@@ -254,8 +249,7 @@ pub struct Assume {
254
249
/// that might violate the language-level bit-validity invariant of the
255
250
/// destination type; e.g.:
256
251
///
257
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
258
- #[ cfg_attr( not( bootstrap) , doc = "```compile_fail,E0277" ) ]
252
+ /// ```compile_fail,E0277
259
253
/// #![feature(transmutability)]
260
254
/// use core::mem::TransmuteFrom;
261
255
///
@@ -271,8 +265,7 @@ pub struct Assume {
271
265
/// that the value being transmuted is a bit-valid instance of the
272
266
/// transmuted value; e.g.:
273
267
///
274
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
275
- #[ cfg_attr( not( bootstrap) , doc = "```rust" ) ]
268
+ /// ```rust
276
269
/// #![feature(transmutability)]
277
270
/// use core::mem::{Assume, TransmuteFrom};
278
271
///
@@ -335,9 +328,7 @@ impl Assume {
335
328
/// This is especially useful for extending [`Assume`] in generic contexts;
336
329
/// e.g.:
337
330
///
338
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
339
- #[ cfg_attr( not( bootstrap) , doc = "```rust" ) ]
340
- #[ unstable( feature = "transmutability" , issue = "99571" ) ]
331
+ /// ```rust
341
332
/// #![feature(
342
333
/// adt_const_params,
343
334
/// generic_const_exprs,
@@ -379,6 +370,7 @@ impl Assume {
379
370
/// try_transmute_ref::<_, _, { Assume::NOTHING }>(src)
380
371
/// };
381
372
///```
373
+ #[ unstable( feature = "transmutability" , issue = "99571" ) ]
382
374
pub const fn and ( self , other_assumptions : Self ) -> Self {
383
375
Self {
384
376
alignment : self . alignment || other_assumptions. alignment ,
@@ -390,8 +382,7 @@ impl Assume {
390
382
391
383
/// Remove `other_assumptions` the obligations of `self`; e.g.:
392
384
///
393
- #[ cfg_attr( bootstrap, doc = "```rust,ignore not runnable on bootstrap" ) ]
394
- #[ cfg_attr( not( bootstrap) , doc = "```rust" ) ]
385
+ /// ```rust
395
386
/// #![feature(transmutability)]
396
387
/// use core::mem::Assume;
397
388
///
0 commit comments