File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
ide/src/syntax_highlighting Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 66
66
< span class ="keyword "> pub</ span > < span class ="field declaration "> y</ span > < span class ="colon "> :</ span > < span class ="builtin_type "> i32</ span > < span class ="comma "> ,</ span >
67
67
< span class ="brace "> }</ span >
68
68
69
- < span class ="keyword "> trait</ span > < span class ="trait declaration "> Bar</ span > < span class ="brace "> {</ span >
69
+ < span class ="keyword "> trait</ span > < span class ="trait declaration "> Bar</ span > < span class ="keyword " > where </ span > < span class =" type_param " > Self </ span > < span class =" colon " > : </ span > < span class =" brace "> {</ span >
70
70
< span class ="keyword "> fn</ span > < span class ="function associated declaration trait "> bar</ span > < span class ="parenthesis "> (</ span > < span class ="operator "> &</ span > < span class ="self_keyword declaration "> self</ span > < span class ="parenthesis "> )</ span > < span class ="operator "> -></ span > < span class ="builtin_type "> i32</ span > < span class ="semicolon "> ;</ span >
71
71
< span class ="brace "> }</ span >
72
72
73
- < span class ="keyword "> impl</ span > < span class ="trait "> Bar</ span > < span class ="keyword "> for</ span > < span class ="struct "> Foo</ span > < span class ="brace "> {</ span >
73
+ < span class ="keyword "> impl</ span > < span class ="trait "> Bar</ span > < span class ="keyword "> for</ span > < span class ="struct "> Foo</ span > < span class ="keyword " > where </ span > < span class =" self_type " > Self </ span > < span class =" colon " > : </ span > < span class =" brace "> {</ span >
74
74
< span class ="keyword "> fn</ span > < span class ="function associated declaration trait "> bar</ span > < span class ="parenthesis "> (</ span > < span class ="operator "> &</ span > < span class ="self_keyword declaration "> self</ span > < span class ="parenthesis "> )</ span > < span class ="operator "> -></ span > < span class ="builtin_type "> i32</ span > < span class ="brace "> {</ span >
75
75
< span class ="self_keyword "> self</ span > < span class ="operator "> .</ span > < span class ="field "> x</ span >
76
76
< span class ="brace "> }</ span >
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ struct Foo {
39
39
pub y: i32,
40
40
}
41
41
42
- trait Bar {
42
+ trait Bar where Self: {
43
43
fn bar(&self) -> i32;
44
44
}
45
45
46
- impl Bar for Foo {
46
+ impl Bar for Foo where Self: {
47
47
fn bar(&self) -> i32 {
48
48
self.x
49
49
}
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ fn semantic_token_type_and_modifiers(
422
422
let type_ = match highlight. tag {
423
423
HlTag :: Symbol ( symbol) => match symbol {
424
424
SymbolKind :: Module => lsp_types:: SemanticTokenType :: NAMESPACE ,
425
- SymbolKind :: Impl => lsp_types :: SemanticTokenType :: TYPE ,
425
+ SymbolKind :: Impl => semantic_tokens :: TYPE_ALIAS ,
426
426
SymbolKind :: Field => lsp_types:: SemanticTokenType :: PROPERTY ,
427
427
SymbolKind :: TypeParam => lsp_types:: SemanticTokenType :: TYPE_PARAMETER ,
428
428
SymbolKind :: ConstParam => semantic_tokens:: CONST_PARAMETER ,
You can’t perform that action at this time.
0 commit comments