]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_parse/parser/generics.rs
Auto merge of #69590 - Dylan-DPC:rollup-i3z0sic, r=Dylan-DPC
[rust.git] / src / librustc_parse / parser / generics.rs
index 4d9a3266567f3d718c90579df6ace9991eeb2798..d5ad1e90d16f4a38932d92d6ec33b5a97762cba9 100644 (file)
@@ -120,15 +120,12 @@ pub(super) fn parse_generic_params(&mut self) -> PResult<'a, Vec<ast::GenericPar
                         .span_label(attrs[0].span, "attributes must go before parameters")
                         .emit();
                     } else {
-                        self.struct_span_err(
-                            attrs[0].span,
-                            &format!("attribute without generic parameters"),
-                        )
-                        .span_label(
-                            attrs[0].span,
-                            "attributes are only permitted when preceding parameters",
-                        )
-                        .emit();
+                        self.struct_span_err(attrs[0].span, "attribute without generic parameters")
+                            .span_label(
+                                attrs[0].span,
+                                "attributes are only permitted when preceding parameters",
+                            )
+                            .emit();
                     }
                 }
                 break;