diff options
author | Aleksey Kladov <[email protected]> | 2020-07-31 12:22:47 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-31 13:12:51 +0100 |
commit | a6e45c6c69bf258118940941c12d057deb79e60c (patch) | |
tree | 35fa6b63518cec8219a43e96525f6d570ac18eec /crates/ra_syntax/src | |
parent | 08ea2271e8050165d0aaf4c994ed3dd746aff3ba (diff) |
Reame PlaceholderType -> InferType
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 9cfd5d017..465cb3202 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -594,10 +594,10 @@ impl ReferenceType { | |||
594 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } | 594 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } |
595 | } | 595 | } |
596 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 596 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
597 | pub struct PlaceholderType { | 597 | pub struct InferType { |
598 | pub(crate) syntax: SyntaxNode, | 598 | pub(crate) syntax: SyntaxNode, |
599 | } | 599 | } |
600 | impl PlaceholderType { | 600 | impl InferType { |
601 | pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) } | 601 | pub fn underscore_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![_]) } |
602 | } | 602 | } |
603 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 603 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -1291,7 +1291,7 @@ pub enum Type { | |||
1291 | ArrayType(ArrayType), | 1291 | ArrayType(ArrayType), |
1292 | SliceType(SliceType), | 1292 | SliceType(SliceType), |
1293 | ReferenceType(ReferenceType), | 1293 | ReferenceType(ReferenceType), |
1294 | PlaceholderType(PlaceholderType), | 1294 | InferType(InferType), |
1295 | FnPointerType(FnPointerType), | 1295 | FnPointerType(FnPointerType), |
1296 | ForType(ForType), | 1296 | ForType(ForType), |
1297 | ImplTraitType(ImplTraitType), | 1297 | ImplTraitType(ImplTraitType), |
@@ -1988,8 +1988,8 @@ impl AstNode for ReferenceType { | |||
1988 | } | 1988 | } |
1989 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1989 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1990 | } | 1990 | } |
1991 | impl AstNode for PlaceholderType { | 1991 | impl AstNode for InferType { |
1992 | fn can_cast(kind: SyntaxKind) -> bool { kind == PLACEHOLDER_TYPE } | 1992 | fn can_cast(kind: SyntaxKind) -> bool { kind == INFER_TYPE } |
1993 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1993 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1994 | if Self::can_cast(syntax.kind()) { | 1994 | if Self::can_cast(syntax.kind()) { |
1995 | Some(Self { syntax }) | 1995 | Some(Self { syntax }) |
@@ -2871,8 +2871,8 @@ impl From<SliceType> for Type { | |||
2871 | impl From<ReferenceType> for Type { | 2871 | impl From<ReferenceType> for Type { |
2872 | fn from(node: ReferenceType) -> Type { Type::ReferenceType(node) } | 2872 | fn from(node: ReferenceType) -> Type { Type::ReferenceType(node) } |
2873 | } | 2873 | } |
2874 | impl From<PlaceholderType> for Type { | 2874 | impl From<InferType> for Type { |
2875 | fn from(node: PlaceholderType) -> Type { Type::PlaceholderType(node) } | 2875 | fn from(node: InferType) -> Type { Type::InferType(node) } |
2876 | } | 2876 | } |
2877 | impl From<FnPointerType> for Type { | 2877 | impl From<FnPointerType> for Type { |
2878 | fn from(node: FnPointerType) -> Type { Type::FnPointerType(node) } | 2878 | fn from(node: FnPointerType) -> Type { Type::FnPointerType(node) } |
@@ -2890,7 +2890,7 @@ impl AstNode for Type { | |||
2890 | fn can_cast(kind: SyntaxKind) -> bool { | 2890 | fn can_cast(kind: SyntaxKind) -> bool { |
2891 | match kind { | 2891 | match kind { |
2892 | PAREN_TYPE | TUPLE_TYPE | NEVER_TYPE | PATH_TYPE | POINTER_TYPE | ARRAY_TYPE | 2892 | PAREN_TYPE | TUPLE_TYPE | NEVER_TYPE | PATH_TYPE | POINTER_TYPE | ARRAY_TYPE |
2893 | | SLICE_TYPE | REFERENCE_TYPE | PLACEHOLDER_TYPE | FN_POINTER_TYPE | FOR_TYPE | 2893 | | SLICE_TYPE | REFERENCE_TYPE | INFER_TYPE | FN_POINTER_TYPE | FOR_TYPE |
2894 | | IMPL_TRAIT_TYPE | DYN_TRAIT_TYPE => true, | 2894 | | IMPL_TRAIT_TYPE | DYN_TRAIT_TYPE => true, |
2895 | _ => false, | 2895 | _ => false, |
2896 | } | 2896 | } |
@@ -2905,7 +2905,7 @@ impl AstNode for Type { | |||
2905 | ARRAY_TYPE => Type::ArrayType(ArrayType { syntax }), | 2905 | ARRAY_TYPE => Type::ArrayType(ArrayType { syntax }), |
2906 | SLICE_TYPE => Type::SliceType(SliceType { syntax }), | 2906 | SLICE_TYPE => Type::SliceType(SliceType { syntax }), |
2907 | REFERENCE_TYPE => Type::ReferenceType(ReferenceType { syntax }), | 2907 | REFERENCE_TYPE => Type::ReferenceType(ReferenceType { syntax }), |
2908 | PLACEHOLDER_TYPE => Type::PlaceholderType(PlaceholderType { syntax }), | 2908 | INFER_TYPE => Type::InferType(InferType { syntax }), |
2909 | FN_POINTER_TYPE => Type::FnPointerType(FnPointerType { syntax }), | 2909 | FN_POINTER_TYPE => Type::FnPointerType(FnPointerType { syntax }), |
2910 | FOR_TYPE => Type::ForType(ForType { syntax }), | 2910 | FOR_TYPE => Type::ForType(ForType { syntax }), |
2911 | IMPL_TRAIT_TYPE => Type::ImplTraitType(ImplTraitType { syntax }), | 2911 | IMPL_TRAIT_TYPE => Type::ImplTraitType(ImplTraitType { syntax }), |
@@ -2924,7 +2924,7 @@ impl AstNode for Type { | |||
2924 | Type::ArrayType(it) => &it.syntax, | 2924 | Type::ArrayType(it) => &it.syntax, |
2925 | Type::SliceType(it) => &it.syntax, | 2925 | Type::SliceType(it) => &it.syntax, |
2926 | Type::ReferenceType(it) => &it.syntax, | 2926 | Type::ReferenceType(it) => &it.syntax, |
2927 | Type::PlaceholderType(it) => &it.syntax, | 2927 | Type::InferType(it) => &it.syntax, |
2928 | Type::FnPointerType(it) => &it.syntax, | 2928 | Type::FnPointerType(it) => &it.syntax, |
2929 | Type::ForType(it) => &it.syntax, | 2929 | Type::ForType(it) => &it.syntax, |
2930 | Type::ImplTraitType(it) => &it.syntax, | 2930 | Type::ImplTraitType(it) => &it.syntax, |
@@ -3719,7 +3719,7 @@ impl std::fmt::Display for ReferenceType { | |||
3719 | std::fmt::Display::fmt(self.syntax(), f) | 3719 | std::fmt::Display::fmt(self.syntax(), f) |
3720 | } | 3720 | } |
3721 | } | 3721 | } |
3722 | impl std::fmt::Display for PlaceholderType { | 3722 | impl std::fmt::Display for InferType { |
3723 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3723 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3724 | std::fmt::Display::fmt(self.syntax(), f) | 3724 | std::fmt::Display::fmt(self.syntax(), f) |
3725 | } | 3725 | } |