Skip to content

Commit 0088533

Browse files
committed
Account for new ast::GenericParamKind::Const::default in rust_ast.
1 parent a9afa98 commit 0088533

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Diff for: src/formatting/spanned.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ impl Spanned for ast::Param {
116116

117117
impl Spanned for ast::GenericParam {
118118
fn span(&self) -> Span {
119-
let lo = if let ast::GenericParamKind::Const { ty: _, kw_span } = self.kind {
119+
let lo = if let ast::GenericParamKind::Const {
120+
ty: _,
121+
kw_span,
122+
default: _,
123+
} = self.kind
124+
{
120125
kw_span.lo()
121126
} else if self.attrs.is_empty() {
122127
self.ident.span.lo()

Diff for: src/formatting/types.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,12 @@ impl Rewrite for ast::GenericParam {
563563
_ => {}
564564
}
565565

566-
if let ast::GenericParamKind::Const { ref ty, kw_span: _ } = &self.kind {
566+
if let ast::GenericParamKind::Const {
567+
ref ty,
568+
kw_span: _,
569+
default: _,
570+
} = &self.kind
571+
{
567572
result.push_str("const ");
568573
result.push_str(rewrite_ident(context, self.ident));
569574
result.push_str(": ");

0 commit comments

Comments
 (0)