Skip to main content

type_contains_reference

Function type_contains_reference 

Source
pub fn type_contains_reference(ty: Ty<'_>) -> bool
Expand description

Whether a type transitively contains a reference.

This is a shallow check: it recurses only through Adt generic arguments, not through tuple elements or Adt fields. See type_contains_raw_ptr for a deeper check that also matches raw pointers.