aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 20:02:55 +0100
committerAleksey Kladov <[email protected]>2020-07-30 20:02:55 +0100
commitf95f425ae4199e814e6956be1d9bb59a14758c07 (patch)
treedd3503a2be3a6699a6b111844dbcdc85b37e2425 /crates/ra_syntax/src/ast
parent2e2642efccd5855e4158b01a006e7884a96982bb (diff)
Use ty to access most TypeRefs
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 207826979..4306efe13 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -198,7 +198,7 @@ impl TypeAlias {
198 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } 198 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
199 pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) } 199 pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
200 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 200 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
201 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 201 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
202 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 202 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
203} 203}
204#[derive(Debug, Clone, PartialEq, Eq, Hash)] 204#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -333,7 +333,7 @@ pub struct RetType {
333} 333}
334impl RetType { 334impl RetType {
335 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) } 335 pub fn thin_arrow_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![->]) }
336 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 336 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
337} 337}
338#[derive(Debug, Clone, PartialEq, Eq, Hash)] 338#[derive(Debug, Clone, PartialEq, Eq, Hash)]
339pub struct WhereClause { 339pub struct WhereClause {
@@ -425,7 +425,7 @@ pub struct TupleField {
425impl ast::AttrsOwner for TupleField {} 425impl ast::AttrsOwner for TupleField {}
426impl ast::VisibilityOwner for TupleField {} 426impl ast::VisibilityOwner for TupleField {}
427impl TupleField { 427impl TupleField {
428 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 428 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
429} 429}
430#[derive(Debug, Clone, PartialEq, Eq, Hash)] 430#[derive(Debug, Clone, PartialEq, Eq, Hash)]
431pub struct VariantList { 431pub struct VariantList {
@@ -525,7 +525,7 @@ pub struct ParenType {
525} 525}
526impl ParenType { 526impl ParenType {
527 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) } 527 pub fn l_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['(']) }
528 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 528 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
529 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) } 529 pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
530} 530}
531#[derive(Debug, Clone, PartialEq, Eq, Hash)] 531#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -559,7 +559,7 @@ impl PointerType {
559 pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) } 559 pub fn star_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![*]) }
560 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } 560 pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) }
561 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 561 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
562 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 562 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
563} 563}
564#[derive(Debug, Clone, PartialEq, Eq, Hash)] 564#[derive(Debug, Clone, PartialEq, Eq, Hash)]
565pub struct ArrayType { 565pub struct ArrayType {
@@ -567,7 +567,7 @@ pub struct ArrayType {
567} 567}
568impl ArrayType { 568impl ArrayType {
569 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } 569 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
570 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 570 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
571 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) } 571 pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
572 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 572 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
573 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 573 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
@@ -578,7 +578,7 @@ pub struct SliceType {
578} 578}
579impl SliceType { 579impl SliceType {
580 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) } 580 pub fn l_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['[']) }
581 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 581 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
582 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) } 582 pub fn r_brack_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![']']) }
583} 583}
584#[derive(Debug, Clone, PartialEq, Eq, Hash)] 584#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -591,7 +591,7 @@ impl ReferenceType {
591 support::token(&self.syntax, T![lifetime]) 591 support::token(&self.syntax, T![lifetime])
592 } 592 }
593 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } 593 pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) }
594 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 594 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
595} 595}
596#[derive(Debug, Clone, PartialEq, Eq, Hash)] 596#[derive(Debug, Clone, PartialEq, Eq, Hash)]
597pub struct PlaceholderType { 597pub struct PlaceholderType {
@@ -618,7 +618,7 @@ pub struct ForType {
618impl ForType { 618impl ForType {
619 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } 619 pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
620 pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) } 620 pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
621 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 621 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
622} 622}
623#[derive(Debug, Clone, PartialEq, Eq, Hash)] 623#[derive(Debug, Clone, PartialEq, Eq, Hash)]
624pub struct ImplTraitType { 624pub struct ImplTraitType {
@@ -882,7 +882,7 @@ impl ast::AttrsOwner for CastExpr {}
882impl CastExpr { 882impl CastExpr {
883 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 883 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
884 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) } 884 pub fn as_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![as]) }
885 pub fn type_ref(&self) -> Option<TypeRef> { support::child(&self.syntax) } 885 pub fn ty(&self) -> Option<TypeRef> { support::child(&self.syntax) }
886} 886}
887#[derive(Debug, Clone, PartialEq, Eq, Hash)] 887#[derive(Debug, Clone, PartialEq, Eq, Hash)]
888pub struct RefExpr { 888pub struct RefExpr {