mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Further improvements to the SourceChange convenience methods
Rename system_edit to file_system_edit, add more documentation, add source_file_edit_from to create a SourceChange from `FileId` and `TextEdit`.
This commit is contained in:
parent
22e1c7a112
commit
b92fcbc956
4 changed files with 50 additions and 27 deletions
|
@ -140,7 +140,7 @@ fn check_module(
|
|||
Problem::UnresolvedModule { candidate } => {
|
||||
let create_file =
|
||||
FileSystemEdit::CreateFile { source_root, path: candidate.clone() };
|
||||
let fix = SourceChange::system_edit("create module", create_file);
|
||||
let fix = SourceChange::file_system_edit("create module", create_file);
|
||||
Diagnostic {
|
||||
range: name_node.range(),
|
||||
message: "unresolved module".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue