]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/rustfmt/src/spanned.rs
Rollup merge of #90035 - SparrowLii:rfc2528, r=jackh726
[rust.git] / src / tools / rustfmt / src / spanned.rs
index 7e3786b7cd94cd344660863b9f083a3d0e89b9e2..8e6c75a3744ac6a8e4b1e0c6a7460f664ff09b0d 100644 (file)
@@ -104,7 +104,7 @@ fn span(&self) -> Span {
 impl Spanned for ast::Param {
     fn span(&self) -> Span {
         if crate::items::is_named_param(self) {
-            mk_sp(self.pat.span.lo(), self.ty.span.hi())
+            mk_sp(crate::items::span_lo_for_param(self), self.ty.span.hi())
         } else {
             self.ty.span
         }