File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ impl<T: ?Sized> *const T {
73
73
where
74
74
T : Sized ,
75
75
{
76
+ // SAFETY: I AM THE MAGIC
76
77
unsafe { core:: mem:: transmute ( self ) }
77
78
}
78
79
@@ -153,7 +154,7 @@ impl<T: ?Sized> *const T {
153
154
/// Here is an example of how to properly use this API to mess around
154
155
/// with tagged pointers. Here we have a tag in the lowest bit:
155
156
///
156
- /// ```ignore
157
+ /// ```text
157
158
/// let my_tagged_ptr: *const T = ...;
158
159
///
159
160
/// // Get the address and do whatever bit tricks we like
Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ pub const fn null_mut<T>() -> *mut T {
273
273
/// It's sound for an API to use an instance of a ZST to enforce some important
274
274
/// safety property. So for instance, you can make an API like this:
275
275
///
276
- /// ```ignore
276
+ /// ```text
277
277
/// pub struct Step1Token(_private_to_construct: ());
278
278
///
279
279
/// pub fn step1() -> Step1Token { ... }
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ impl<T: ?Sized> *mut T {
76
76
where
77
77
T : Sized ,
78
78
{
79
+ // SAFETY: I AM THE MAGIC
79
80
unsafe { core:: mem:: transmute ( self ) }
80
81
}
81
82
@@ -156,7 +157,7 @@ impl<T: ?Sized> *mut T {
156
157
/// Here is an example of how to properly use this API to mess around
157
158
/// with tagged pointers. Here we have a tag in the lowest bit:
158
159
///
159
- /// ```ignore
160
+ /// ```text
160
161
/// let my_tagged_ptr: *mut T = ...;
161
162
///
162
163
/// // Get the address and do whatever bit tricks we like
You can’t perform that action at this time.
0 commit comments