mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 14:33:29 +00:00
Fixed request changes
This commit is contained in:
parent
02e9e46ed6
commit
6263aa13d0
2 changed files with 5 additions and 6 deletions
|
@ -98,14 +98,14 @@ pub(crate) trait AsName {
|
||||||
|
|
||||||
impl AsName for ast::NameRef {
|
impl AsName for ast::NameRef {
|
||||||
fn as_name(&self) -> Name {
|
fn as_name(&self) -> Name {
|
||||||
let name = resolve_name(self.text().clone());
|
let name = resolve_name(self.text());
|
||||||
Name::new(name)
|
Name::new(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AsName for ast::Name {
|
impl AsName for ast::Name {
|
||||||
fn as_name(&self) -> Name {
|
fn as_name(&self) -> Name {
|
||||||
let name = resolve_name(self.text().clone());
|
let name = resolve_name(self.text());
|
||||||
Name::new(name)
|
Name::new(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,11 +187,11 @@ impl AsName for KnownName {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resolve_name(text: SmolStr) -> SmolStr {
|
fn resolve_name(text: &SmolStr) -> SmolStr {
|
||||||
let raw_start = "r#";
|
let raw_start = "r#";
|
||||||
if text.as_str().starts_with(raw_start) {
|
if text.as_str().starts_with(raw_start) {
|
||||||
SmolStr::new(&text[raw_start.len()..])
|
SmolStr::new(&text[raw_start.len()..])
|
||||||
} else {
|
} else {
|
||||||
text
|
text.clone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,7 +362,6 @@ fn module_resolution_works_for_raw_modules() {
|
||||||
⋮crate::async
|
⋮crate::async
|
||||||
⋮Bar: t v
|
⋮Bar: t v
|
||||||
"###);
|
"###);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue