diff --git a/src/main/grammars/RustParser.bnf b/src/main/grammars/RustParser.bnf index 00838aecb9c..a9843039fb6 100644 --- a/src/main/grammars/RustParser.bnf +++ b/src/main/grammars/RustParser.bnf @@ -231,7 +231,7 @@ ColonTypeArgumentList ::= &'::' TypeArgumentListImpl { elementType = TypeArgumen private TypeArgumentListImpl ::= '::'? '<' !'=' <>* '>' { pin = 3 } private AnyTypeArgument ::= AssocTypeBinding | TypeReference | Lifetime | RestrictedConstExpr -AssocTypeBinding ::= identifier (AssocTypeBindingType | AssocTypeBindingBound) { +AssocTypeBinding ::= identifier TypeArgumentList? (AssocTypeBindingType | AssocTypeBindingBound) { implements = [ "org.rust.lang.core.psi.ext.RsMandatoryReferenceElement" ] mixin = "org.rust.lang.core.psi.ext.RsAssocTypeBindingMixin" stubClass = "org.rust.lang.core.stubs.RsAssocTypeBindingStub" @@ -1008,9 +1008,7 @@ private ImplicitTraitTypeInner ::= Polybound ('+' Polybound)+ private TraitType_upper ::= ('+' Polybound)+ -upper TypeAlias ::= TYPE_KW identifier - [ TypeParameterList WhereClause? | WhereClause | TypeParamBounds ] - [ '=' TypeReference ] ';' { +upper TypeAlias ::= TYPE_KW identifier TypeParameterList? TypeParamBounds? WhereClause? [ '=' TypeReference ] ';' { pin = 'identifier' name = "" implements = [ "org.rust.lang.core.psi.ext.RsQualifiedNamedElement" diff --git a/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt b/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt index 96e1b169537..48f4cb7d723 100644 --- a/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt +++ b/src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt @@ -104,6 +104,6 @@ class RustParserDefinition : ParserDefinition { /** * Should be increased after any change of parser rules */ - const val PARSER_VERSION: Int = LEXER_VERSION + 37 + const val PARSER_VERSION: Int = LEXER_VERSION + 38 } } diff --git a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.rs b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.rs index 16c5a61ff05..e8913167a2b 100644 --- a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.rs +++ b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.rs @@ -1,10 +1,13 @@ trait T { - type B; - type A = Self; + type A; + type B = Self; + type C; + type D = E; } struct S; impl T for S { - type B = T; + type A = T; + type C = T; } diff --git a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.txt b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.txt index 68922abf957..dec66b049d2 100644 --- a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.txt +++ b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/associated_types.txt @@ -10,13 +10,13 @@ FILE RsTypeAliasImpl(TYPE_ALIAS) PsiElement(type)('type') PsiWhiteSpace(' ') - PsiElement(identifier)('B') + PsiElement(identifier)('A') PsiElement(;)(';') PsiWhiteSpace('\n ') RsTypeAliasImpl(TYPE_ALIAS) PsiElement(type)('type') PsiWhiteSpace(' ') - PsiElement(identifier)('A') + PsiElement(identifier)('B') PsiWhiteSpace(' ') PsiElement(=)('=') PsiWhiteSpace(' ') @@ -24,6 +24,40 @@ FILE RsPathImpl(PATH) PsiElement(Self)('Self') PsiElement(;)(';') + PsiWhiteSpace('\n ') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('C') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('U') + PsiElement(>)('>') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('D') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('U') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('E') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('U') + PsiElement(>)('>') + PsiElement(;)(';') PsiWhiteSpace('\n') PsiElement(})('}') PsiWhiteSpace('\n\n') @@ -52,13 +86,36 @@ FILE RsTypeAliasImpl(TYPE_ALIAS) PsiElement(type)('type') PsiWhiteSpace(' ') - PsiElement(identifier)('B') + PsiElement(identifier)('A') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(;)(';') + PsiWhiteSpace('\n ') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('C') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('U') + PsiElement(>)('>') PsiWhiteSpace(' ') PsiElement(=)('=') PsiWhiteSpace(' ') RsBaseTypeImpl(BASE_TYPE) RsPathImpl(PATH) PsiElement(identifier)('T') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('U') + PsiElement(>)('>') PsiElement(;)(';') PsiWhiteSpace('\n') PsiElement(})('}') diff --git a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.rs b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.rs index c1e6f33f317..49fc1b6b829 100644 --- a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.rs +++ b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.rs @@ -46,3 +46,9 @@ fn assoc_type_bounds2>(t: T) {} fn assoc_type_bounds3>(t: T) {} fn assoc_type_bounds4>(t: T) {} fn assoc_type_bounds_in_args(t: &dyn Foo) {} + +fn gat_bounds1: Bar>>(t: T) {} +fn gat_bounds2: Bar+Baz>>(t: T) {} +fn gat_bounds3: Bar, Item2 = ()>>(t: T) {} +fn gat_bounds4 = (), Item2: Bar>>(t: T) {} +fn gat_in_args(t: &dyn Foo: Bar>) {} diff --git a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.txt b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.txt index 8c8fc3048c2..216d20e6b7e 100644 --- a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.txt +++ b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/polybounds.txt @@ -1011,3 +1011,295 @@ FILE RsBlockImpl(BLOCK) PsiElement({)('{') PsiElement(})('}') + PsiWhiteSpace('\n\n') + RsFunctionImpl(FUNCTION) + PsiElement(fn)('fn') + PsiWhiteSpace(' ') + PsiElement(identifier)('gat_bounds1') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Foo') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bar') + PsiElement(>)('>') + PsiElement(>)('>') + RsValueParameterListImpl(VALUE_PARAMETER_LIST) + PsiElement(()('(') + RsValueParameterImpl(VALUE_PARAMETER) + RsPatIdentImpl(PAT_IDENT) + RsPatBindingImpl(PAT_BINDING) + PsiElement(identifier)('t') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement())(')') + PsiWhiteSpace(' ') + RsBlockImpl(BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + RsFunctionImpl(FUNCTION) + PsiElement(fn)('fn') + PsiWhiteSpace(' ') + PsiElement(identifier)('gat_bounds2') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Foo') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bar') + PsiElement(+)('+') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Baz') + PsiElement(>)('>') + PsiElement(>)('>') + RsValueParameterListImpl(VALUE_PARAMETER_LIST) + PsiElement(()('(') + RsValueParameterImpl(VALUE_PARAMETER) + RsPatIdentImpl(PAT_IDENT) + RsPatBindingImpl(PAT_BINDING) + PsiElement(identifier)('t') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement())(')') + PsiWhiteSpace(' ') + RsBlockImpl(BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + RsFunctionImpl(FUNCTION) + PsiElement(fn)('fn') + PsiWhiteSpace(' ') + PsiElement(identifier)('gat_bounds3') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Foo') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item1') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bar') + PsiElement(,)(',') + PsiWhiteSpace(' ') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item2') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + PsiElement(()('(') + PsiElement())(')') + PsiElement(>)('>') + PsiElement(>)('>') + RsValueParameterListImpl(VALUE_PARAMETER_LIST) + PsiElement(()('(') + RsValueParameterImpl(VALUE_PARAMETER) + RsPatIdentImpl(PAT_IDENT) + RsPatBindingImpl(PAT_BINDING) + PsiElement(identifier)('t') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement())(')') + PsiWhiteSpace(' ') + RsBlockImpl(BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + RsFunctionImpl(FUNCTION) + PsiElement(fn)('fn') + PsiWhiteSpace(' ') + PsiElement(identifier)('gat_bounds4') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Foo') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item1') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + PsiElement(()('(') + PsiElement())(')') + PsiElement(,)(',') + PsiWhiteSpace(' ') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item2') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bar') + PsiElement(>)('>') + PsiElement(>)('>') + RsValueParameterListImpl(VALUE_PARAMETER_LIST) + PsiElement(()('(') + RsValueParameterImpl(VALUE_PARAMETER) + RsPatIdentImpl(PAT_IDENT) + RsPatBindingImpl(PAT_BINDING) + PsiElement(identifier)('t') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement())(')') + PsiWhiteSpace(' ') + RsBlockImpl(BLOCK) + PsiElement({)('{') + PsiElement(})('}') + PsiWhiteSpace('\n') + RsFunctionImpl(FUNCTION) + PsiElement(fn)('fn') + PsiWhiteSpace(' ') + PsiElement(identifier)('gat_in_args') + RsValueParameterListImpl(VALUE_PARAMETER_LIST) + PsiElement(()('(') + RsValueParameterImpl(VALUE_PARAMETER) + RsPatIdentImpl(PAT_IDENT) + RsPatBindingImpl(PAT_BINDING) + PsiElement(identifier)('t') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsRefLikeTypeImpl(REF_LIKE_TYPE) + PsiElement(&)('&') + RsTraitTypeImpl(TRAIT_TYPE) + PsiElement(dyn_kw)('dyn') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Foo') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsAssocTypeBindingImpl(ASSOC_TYPE_BINDING) + PsiElement(identifier)('Item') + RsTypeArgumentListImpl(TYPE_ARGUMENT_LIST) + PsiElement(<)('<') + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bar') + PsiElement(>)('>') + PsiElement())(')') + PsiWhiteSpace(' ') + RsBlockImpl(BLOCK) + PsiElement({)('{') + PsiElement(})('}') diff --git a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.rs b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.rs index b882056c82c..f80cf8655cf 100644 --- a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.rs +++ b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.rs @@ -48,3 +48,8 @@ type ExternCFn = extern "C" fn(); type ExternFnWithEscapeInAbi = extern "R\x75st" fn(); type ExternFnWithRawAbi = extern r"system" fn(); type ExternFnWithInvalidAbi = extern true fn(); + +type GatSimple = (); +type GatBound: Bound = (); +type GatWhere where T: Bound = (); +type GatBoundWhere: Bound where T: Bound = (); diff --git a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.txt b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.txt index 66214b58777..24a8dfae055 100644 --- a/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.txt +++ b/src/test/resources/org/rust/lang/core/parser/fixtures/complete/type.txt @@ -948,3 +948,119 @@ FILE PsiElement(()('(') PsiElement())(')') PsiElement(;)(';') + PsiWhiteSpace('\n\n') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('GatSimple') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('GatBound') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + PsiElement(>)('>') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bound') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('GatWhere') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + PsiElement(>)('>') + PsiWhiteSpace(' ') + RsWhereClauseImpl(WHERE_CLAUSE) + PsiElement(where)('where') + PsiWhiteSpace(' ') + RsWherePredImpl(WHERE_PRED) + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bound') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';') + PsiWhiteSpace('\n') + RsTypeAliasImpl(TYPE_ALIAS) + PsiElement(type)('type') + PsiWhiteSpace(' ') + PsiElement(identifier)('GatBoundWhere') + RsTypeParameterListImpl(TYPE_PARAMETER_LIST) + PsiElement(<)('<') + RsTypeParameterImpl(TYPE_PARAMETER) + PsiElement(identifier)('T') + PsiElement(>)('>') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bound') + PsiWhiteSpace(' ') + RsWhereClauseImpl(WHERE_CLAUSE) + PsiElement(where)('where') + PsiWhiteSpace(' ') + RsWherePredImpl(WHERE_PRED) + RsBaseTypeImpl(BASE_TYPE) + RsPathImpl(PATH) + PsiElement(identifier)('T') + RsTypeParamBoundsImpl(TYPE_PARAM_BOUNDS) + PsiElement(:)(':') + PsiWhiteSpace(' ') + RsPolyboundImpl(POLYBOUND) + RsBoundImpl(BOUND) + RsTraitRefImpl(TRAIT_REF) + RsPathImpl(PATH) + PsiElement(identifier)('Bound') + PsiWhiteSpace(' ') + PsiElement(=)('=') + PsiWhiteSpace(' ') + RsBaseTypeImpl(BASE_TYPE) + PsiElement(()('(') + PsiElement())(')') + PsiElement(;)(';')