11896: fix: Show the path to be created in the unresolved-module fix label r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2022-04-04 14:14:26 +00:00 committed by GitHub
commit bf6303df37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedModule) -> Option<Vec<
.map(|candidate| {
fix(
"create_module",
"Create module",
&format!("Create module at `{candidate}`"),
FileSystemEdit::CreateFile {
dst: AnchoredPathBuf {
anchor: d.decl.file_id.original_file(ctx.sema.db),
@ -97,7 +97,7 @@ mod baz {}
"create_module",
QuickFix,
),
label: "Create module",
label: "Create module at `foo.rs`",
group: None,
target: 0..8,
source_change: Some(
@ -123,7 +123,7 @@ mod baz {}
"create_module",
QuickFix,
),
label: "Create module",
label: "Create module at `foo/mod.rs`",
group: None,
target: 0..8,
source_change: Some(

View File

@ -465,7 +465,7 @@ fn main() {}
},
json!([
{
"title": "Create module",
"title": "Create module at `bar.rs`",
"kind": "quickfix",
"edit": {
"documentChanges": [
@ -477,7 +477,7 @@ fn main() {}
}
},
{
"title": "Create module",
"title": "Create module at `bar/mod.rs`",
"kind": "quickfix",
"edit": {
"documentChanges": [
@ -549,7 +549,7 @@ fn main() {{}}
},
json!([
{
"title": "Create module",
"title": "Create module at `bar.rs`",
"kind": "quickfix",
"edit": {
"documentChanges": [
@ -561,7 +561,7 @@ fn main() {{}}
}
},
{
"title": "Create module",
"title": "Create module at `bar/mod.rs`",
"kind": "quickfix",
"edit": {
"documentChanges": [