Skip to content

Commit 3d9ac49

Browse files
committed
fix: Fix incorrect expansion of builtin PartialOrd derive
1 parent d31301c commit 3d9ac49

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

crates/hir-def/src/macro_expansion_tests/builtin_derive_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ enum Command {
336336
}
337337
338338
impl <> $crate::cmp::PartialOrd for Command< > where {
339-
fn partial_cmp(&self , other: &Self ) -> $crate::option::Option::Option<$crate::cmp::Ordering> {
339+
fn partial_cmp(&self , other: &Self ) -> $crate::option::Option<$crate::cmp::Ordering> {
340340
match $crate::intrinsics::discriminant_value(self ).partial_cmp(&$crate::intrinsics::discriminant_value(other)) {
341341
$crate::option::Option::Some($crate::cmp::Ordering::Equal)=> {
342342
match (self , other) {

crates/hir-expand/src/builtin/derive_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ fn partial_ord_expand(
969969
span,
970970
);
971971
quote! {span =>
972-
fn partial_cmp(&self, other: &Self) -> #krate::option::Option::Option<#krate::cmp::Ordering> {
972+
fn partial_cmp(&self, other: &Self) -> #krate::option::Option<#krate::cmp::Ordering> {
973973
#body
974974
}
975975
}

crates/parser/src/syntax_kind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Defines [`SyntaxKind`] -- a fieldless enum of all possible syntactic
22
//! constructs of the Rust language.
33
4+
#[rustfmt::skip]
45
mod generated;
56

67
use crate::Edition;

0 commit comments

Comments
 (0)