add_ty_alias_where_clause in rustc_ast_lowering::item - Rust
Description: When we have a ty alias we may have two where clauses. To give the best diagnostics, we set the span to the where clause that is preferred, if it exists. Otherwise, it sets the span to the other where clause if it exists.

Skip to main content

## add_ty_alias_where_clause

# Function add_ty_alias_where_clause

Source

    fn add_ty_alias_where_clause(
        generics: &mut Generics,
        after_where_clause: &WhereClause,
        prefer_first: bool,
    )

Expand description

When we have a ty alias we may have two where clauses. To give the best diagnostics, we set the span to the where clause that is preferred, if it exists. Otherwise, it sets the span to the other where clause if it exists.