summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs b/compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs
index 9f4624790..54b6cb7d7 100644
--- a/compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs
+++ b/compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs
@@ -19,8 +19,6 @@ pub fn expand_deriving_partial_ord(
let ret_ty =
Path(Path::new_(pathvec_std!(option::Option), vec![Box::new(ordering_ty)], PathKind::Std));
- let attrs = thin_vec![cx.attr_word(sym::inline, span)];
-
// Order in which to perform matching
let tag_then_data = if let Annotatable::Item(item) = item
&& let ItemKind::Enum(def, _) = &item.kind {
@@ -48,7 +46,7 @@ pub fn expand_deriving_partial_ord(
explicit_self: true,
nonself_args: vec![(self_ref(), sym::other)],
ret_ty,
- attributes: attrs,
+ attributes: thin_vec![cx.attr_word(sym::inline, span)],
fieldless_variants_strategy: FieldlessVariantsStrategy::Unify,
combine_substructure: combine_substructure(Box::new(|cx, span, substr| {
cs_partial_cmp(cx, span, substr, tag_then_data)