Skip to content

Commit bd37a3c

Browse files
committed
Auto merge of rust-lang#117727 - saethlin:inline-derived-fmt, r=<try>
Emit #[inline] on derive(Debug) Breaking out part of rust-lang#116583 (comment) r? `@ghost`
2 parents fdaaaf9 + a317db1 commit bd37a3c

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_builtin_macros/src/deriving

1 file changed

+1
-1
lines changed

compiler/rustc_builtin_macros/src/deriving/debug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn expand_deriving_debug(
3333
explicit_self: true,
3434
nonself_args: vec![(fmtr, sym::f)],
3535
ret_ty: Path(path_std!(fmt::Result)),
36-
attributes: ast::AttrVec::new(),
36+
attributes: thin_vec![cx.attr_word(sym::inline, span)],
3737
fieldless_variants_strategy:
3838
FieldlessVariantsStrategy::SpecializeIfAllVariantsFieldless,
3939
combine_substructure: combine_substructure(Box::new(|a, b, c| {

0 commit comments

Comments
 (0)