1
Fork 0

Fix doc test

This commit is contained in:
Maybe Waffle 2023-04-11 21:45:19 +00:00
parent 12fd610e01
commit ad92677008

View file

@ -60,8 +60,12 @@ pub unsafe trait Pointer: Deref {
/// ///
/// ```rust /// ```rust
/// # use std::ops::Deref; /// # use std::ops::Deref;
/// # type Self = &'static u64; /// # use rustc_data_structures::tagged_ptr::bits_for;
/// bits_for::<Self::Target>() /// # struct T;
/// # impl Deref for T { type Target = u8; fn deref(&self) -> &u8 { &0 } }
/// # impl T {
/// const BITS: usize = bits_for::<<Self as Deref>::Target>();
/// # }
/// ``` /// ```
/// ///
/// [`Self::Target`]: Deref::Target /// [`Self::Target`]: Deref::Target