1
Fork 0

Do not format generic consts

This commit is contained in:
Michael Goulet 2024-11-02 20:25:02 +00:00
parent 00ed73cdc0
commit 16394e9776
3 changed files with 52 additions and 6 deletions

View file

@ -414,6 +414,12 @@ pub struct WhereClause {
pub span: Span,
}
impl WhereClause {
pub fn is_empty(&self) -> bool {
!self.has_where_token && self.predicates.is_empty()
}
}
impl Default for WhereClause {
fn default() -> WhereClause {
WhereClause { has_where_token: false, predicates: ThinVec::new(), span: DUMMY_SP }