mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Merge commit '9d8889cdfc
' into sync-from-ra
This commit is contained in:
parent
3afeb24198
commit
6bbd106c70
104 changed files with 1652 additions and 1026 deletions
|
@ -322,7 +322,7 @@ fn load_crate_graph(
|
|||
break;
|
||||
}
|
||||
}
|
||||
vfs::loader::Message::Loaded { files } => {
|
||||
vfs::loader::Message::Loaded { files } | vfs::loader::Message::Changed { files } => {
|
||||
for (path, contents) in files {
|
||||
vfs.set_file_contents(path.into(), contents);
|
||||
}
|
||||
|
@ -331,9 +331,8 @@ fn load_crate_graph(
|
|||
}
|
||||
let changes = vfs.take_changes();
|
||||
for file in changes {
|
||||
if file.exists() {
|
||||
let contents = vfs.file_contents(file.file_id);
|
||||
if let Ok(text) = std::str::from_utf8(contents) {
|
||||
if let vfs::Change::Create(v) | vfs::Change::Modify(v) = file.change {
|
||||
if let Ok(text) = std::str::from_utf8(&v) {
|
||||
analysis_change.change_file(file.file_id, Some(text.into()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue