Skip to content

Commit 9c01af0

Browse files
authored
Merge pull request #19408 from Veykril/push-wtnxzulsovxy
refactor: Reduce codegen burden for generated syntax
2 parents 0f370b0 + 3d9ac49 commit 9c01af0

File tree

11 files changed

+2848
-468
lines changed

11 files changed

+2848
-468
lines changed

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

+1-1
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

+1-1
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/ide/src/syntax_highlighting/highlight.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ fn highlight_name_ref_by_syntax(
852852
}
853853
}
854854
ASSOC_TYPE_ARG => SymbolKind::TypeAlias.into(),
855-
USE_BOUND_GENERIC_ARG => SymbolKind::TypeParam.into(),
855+
USE_BOUND_GENERIC_ARGS => SymbolKind::TypeParam.into(),
856856
_ => default.into(),
857857
}
858858
}

crates/parser/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ mod shortcuts;
3535
mod syntax_kind;
3636
mod token_set;
3737

38+
pub use T_ as T;
39+
3840
#[cfg(test)]
3941
mod tests;
4042

crates/parser/src/syntax_kind.rs

+1
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;

crates/parser/src/syntax_kind/generated.rs

+27-32
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)