pub enum PathCheck {
Exact,
Resolution,
}Expand description
Determines how paths are hashed and compared for equality.
Variants§
Exact
Paths must match exactly and are hashed by their exact HIR tree.
Thus, std::iter::Iterator and Iterator are not considered equal even though they refer
to the same item.
Resolution
Paths are compared and hashed based on their resolution.
They can appear different in the HIR tree but are still considered equal and have equal hashes as long as they refer to the same item.
Note that this is currently only partially implemented specifically for paths that are resolved before type-checking, i.e. the final segment must have a non-error resolution. If a path with an error resolution is encountered, it falls back to the default exact matching behavior.
Trait Implementations§
impl Copy for PathCheck
Auto Trait Implementations§
impl Freeze for PathCheck
impl RefUnwindSafe for PathCheck
impl Send for PathCheck
impl Sync for PathCheck
impl Unpin for PathCheck
impl UnwindSafe for PathCheck
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Exact: 0 bytesResolution: 0 bytes