naga::proc

Function compare_types

Source
pub fn compare_types(
    lhs: &TypeResolution,
    rhs: &TypeResolution,
    types: &UniqueArena<Type>,
) -> bool
Expand description

Compare two types.

This is the most general way of comparing two types, as it can distinguish two structs with different names but the same members. For other ways, see TypeInner::non_struct_equivalent and TypeInner::eq.

In Naga code, this is usually called via the like-named methods on Module, GlobalCtx, and BlockContext.