Skip to main content

replace_ty_args

Function replace_ty_args 

Source
fn replace_ty_args<'tcx>(property: &mut Property<'tcx>, ty: Ty<'tcx>)
Expand description

Replace every type argument in a property tree with the slice element type.

The slice invariant’s only type arguments are the $elem placeholders, so this recovers the concrete element type (including composites such as [T; N]) that the name-based JSON type parser cannot express. It also reaches size_of/align_of type arguments inside ValidNum predicates.