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 6666 < 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 >
6767< span class ="brace "> }</ span >
6868
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 >
7070 < 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 >
7171< span class ="brace "> }</ span >
7272
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 >
7474 < 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 >
7575 < span class ="self_keyword "> self</ span > < span class ="operator "> .</ span > < span class ="field "> x</ span >
7676 < span class ="brace "> }</ span >
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ struct Foo {
3939 pub y: i32,
4040}
4141
42- trait Bar {
42+ trait Bar where Self: {
4343 fn bar(&self) -> i32;
4444}
4545
46- impl Bar for Foo {
46+ impl Bar for Foo where Self: {
4747 fn bar(&self) -> i32 {
4848 self.x
4949 }
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ fn semantic_token_type_and_modifiers(
422422 let type_ = match highlight. tag {
423423 HlTag :: Symbol ( symbol) => match symbol {
424424 SymbolKind :: Module => lsp_types:: SemanticTokenType :: NAMESPACE ,
425- SymbolKind :: Impl => lsp_types :: SemanticTokenType :: TYPE ,
425+ SymbolKind :: Impl => semantic_tokens :: TYPE_ALIAS ,
426426 SymbolKind :: Field => lsp_types:: SemanticTokenType :: PROPERTY ,
427427 SymbolKind :: TypeParam => lsp_types:: SemanticTokenType :: TYPE_PARAMETER ,
428428 SymbolKind :: ConstParam => semantic_tokens:: CONST_PARAMETER ,
You can’t perform that action at this time.
0 commit comments