syntax::ast::make

Function generic_ty_path_segment

Source
pub fn generic_ty_path_segment(
    name_ref: NameRef,
    generic_args: impl IntoIterator<Item = GenericArg>,
) -> PathSegment
Expand description

Type and expressions/patterns path differ in whether they require :: before generic arguments. Type paths allow them but they are often omitted, while expression/pattern paths require them.