From 90230e882d19cc65158453fe9c636827158b2bbd Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 16 May 2021 15:11:48 +0200 Subject: Tag Self in impls as a TypeAlias --- crates/ide/src/syntax_highlighting/test_data/highlighting.html | 4 ++-- crates/ide/src/syntax_highlighting/tests.rs | 4 ++-- crates/rust-analyzer/src/to_proto.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html index 33bc6b0f3..0d325f3f3 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html @@ -66,11 +66,11 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd pub y: i32, } -trait Bar { +trait Bar where Self: { fn bar(&self) -> i32; } -impl Bar for Foo { +impl Bar for Foo where Self: { fn bar(&self) -> i32 { self.x } diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs index 32f2d9038..e05971983 100644 --- a/crates/ide/src/syntax_highlighting/tests.rs +++ b/crates/ide/src/syntax_highlighting/tests.rs @@ -39,11 +39,11 @@ struct Foo { pub y: i32, } -trait Bar { +trait Bar where Self: { fn bar(&self) -> i32; } -impl Bar for Foo { +impl Bar for Foo where Self: { fn bar(&self) -> i32 { self.x } diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 8ce4aa242..73dcba694 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -422,7 +422,7 @@ fn semantic_token_type_and_modifiers( let type_ = match highlight.tag { HlTag::Symbol(symbol) => match symbol { SymbolKind::Module => lsp_types::SemanticTokenType::NAMESPACE, - SymbolKind::Impl => lsp_types::SemanticTokenType::TYPE, + SymbolKind::Impl => semantic_tokens::TYPE_ALIAS, SymbolKind::Field => lsp_types::SemanticTokenType::PROPERTY, SymbolKind::TypeParam => lsp_types::SemanticTokenType::TYPE_PARAMETER, SymbolKind::ConstParam => semantic_tokens::CONST_PARAMETER, -- cgit v1.2.3