mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
⬆️ rust-analyzer
This commit is contained in:
parent
134701885d
commit
31519bb394
83 changed files with 2092 additions and 626 deletions
|
@ -20,7 +20,7 @@ impl RootDatabase {
|
|||
pub fn apply_change(&mut self, change: Change) {
|
||||
let _p = profile::span("RootDatabase::apply_change");
|
||||
self.request_cancellation();
|
||||
tracing::info!("apply_change {:?}", change);
|
||||
tracing::trace!("apply_change {:?}", change);
|
||||
if let Some(roots) = &change.roots {
|
||||
let mut local_roots = FxHashSet::default();
|
||||
let mut library_roots = FxHashSet::default();
|
||||
|
|
|
@ -82,7 +82,7 @@ impl Definition {
|
|||
}
|
||||
|
||||
/// Textual range of the identifier which will change when renaming this
|
||||
/// `Definition`. Note that some definitions, like buitin types, can't be
|
||||
/// `Definition`. Note that some definitions, like builtin types, can't be
|
||||
/// renamed.
|
||||
pub fn range_for_rename(self, sema: &Semantics<'_, RootDatabase>) -> Option<FileRange> {
|
||||
let res = match self {
|
||||
|
|
|
@ -402,7 +402,9 @@ impl<'a> FindUsages<'a> {
|
|||
.or_else(|| ty.as_builtin().map(|builtin| builtin.name()))
|
||||
})
|
||||
};
|
||||
self.def.name(sema.db).or_else(self_kw_refs).map(|it| it.to_smol_str())
|
||||
// We need to unescape the name in case it is written without "r#" in earlier
|
||||
// editions of Rust where it isn't a keyword.
|
||||
self.def.name(sema.db).or_else(self_kw_refs).map(|it| it.unescaped().to_smol_str())
|
||||
}
|
||||
};
|
||||
let name = match &name {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue