aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-18 16:13:06 +0000
committerGitHub <[email protected]>2021-01-18 16:13:06 +0000
commit9daba961f236750c3a5d831c9775606271b37eff (patch)
tree6d8c037ea915434701e573bf5eb2eb1f696eef07 /crates/hir_ty
parentcc58459ee39db804c0b4a660d1f0bb5c9c0bb648 (diff)
parent98718e0544f42e55642d2838b00d6a7bef1e2414 (diff)
Merge #7291
7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril That should be the remaining special casing for `self` 🎉 Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/src/tests.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/tests.rs b/crates/hir_ty/src/tests.rs
index 3b1675f0b..5ff755321 100644
--- a/crates/hir_ty/src/tests.rs
+++ b/crates/hir_ty/src/tests.rs
@@ -26,7 +26,7 @@ use once_cell::race::OnceBool;
26use stdx::format_to; 26use stdx::format_to;
27use syntax::{ 27use syntax::{
28 algo, 28 algo,
29 ast::{self, AstNode}, 29 ast::{self, AstNode, NameOwner},
30 SyntaxNode, 30 SyntaxNode,
31}; 31};
32use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry}; 32use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry};
@@ -153,7 +153,7 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
153 }); 153 });
154 for (node, ty) in &types { 154 for (node, ty) in &types {
155 let (range, text) = if let Some(self_param) = ast::SelfParam::cast(node.value.clone()) { 155 let (range, text) = if let Some(self_param) = ast::SelfParam::cast(node.value.clone()) {
156 (self_param.self_token().unwrap().text_range(), "self".to_string()) 156 (self_param.name().unwrap().syntax().text_range(), "self".to_string())
157 } else { 157 } else {
158 (node.value.text_range(), node.value.text().to_string().replace("\n", " ")) 158 (node.value.text_range(), node.value.text().to_string().replace("\n", " "))
159 }; 159 };