We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12fd610 commit ad92677Copy full SHA for ad92677
compiler/rustc_data_structures/src/tagged_ptr.rs
@@ -60,8 +60,12 @@ pub unsafe trait Pointer: Deref {
60
///
61
/// ```rust
62
/// # use std::ops::Deref;
63
- /// # type Self = &'static u64;
64
- /// bits_for::<Self::Target>()
+ /// # use rustc_data_structures::tagged_ptr::bits_for;
+ /// # struct T;
65
+ /// # impl Deref for T { type Target = u8; fn deref(&self) -> &u8 { &0 } }
66
+ /// # impl T {
67
+ /// const BITS: usize = bits_for::<<Self as Deref>::Target>();
68
+ /// # }
69
/// ```
70
71
/// [`Self::Target`]: Deref::Target
0 commit comments