Rollup merge of #132540 - compiler-errors:gc, r=calebcartwright
Do not format generic consts We introduced **nightly support** for generic const items in #113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items. r? `````@calebcartwright````` or `````@ytmimi`````
This commit is contained in:
commit
13cdfae599
3 changed files with 52 additions and 6 deletions
|
@ -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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue