File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
compiler/rustc_data_structures/src Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 1- //! This module implements tagged pointers.
1+ //! This module implements tagged pointers. In order to utilize the pointer
2+ //! packing, you must have a tag type implementing the [`Tag`] trait.
23//!
3- //! In order to utilize the pointer packing, you must have two types: a pointer,
4- //! and a tag.
5- //!
6- //! The pointer must implement the [`Pointer`] trait, with the primary
7- //! requirement being convertible to and from a raw pointer. Note that the
8- //! pointer must be dereferenceable, so raw pointers generally cannot implement
9- //! the [`Pointer`] trait. This implies that the pointer must also be non-null.
10- //!
11- //! Many common pointer types already implement the [`Pointer`] trait.
12- //!
13- //! The tag must implement the [`Tag`] trait.
14- //!
15- //! We assert that the tag and the [`Pointer`] types are compatible at compile
4+ //! We assert that the tag and the reference type is compatible at compile
165//! time.
176
187use std:: fmt;
You can’t perform that action at this time.
0 commit comments