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
/// # use std::ops::Deref;
/// # type Self = &'static u64;
/// bits_for::<Self::Target>()
/// # use rustc_data_structures::tagged_ptr::bits_for;
/// # 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