Skip to content

Commit bf6303d

Browse files
bors[bot]Veykril
andauthored
Merge #11896
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 <[email protected]>
2 parents f5c069c + 3a847ea commit bf6303d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

crates/ide_diagnostics/src/handlers/unresolved_module.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedModule) -> Option<Vec<
3939
.map(|candidate| {
4040
fix(
4141
"create_module",
42-
"Create module",
42+
&format!("Create module at `{candidate}`"),
4343
FileSystemEdit::CreateFile {
4444
dst: AnchoredPathBuf {
4545
anchor: d.decl.file_id.original_file(ctx.sema.db),
@@ -97,7 +97,7 @@ mod baz {}
9797
"create_module",
9898
QuickFix,
9999
),
100-
label: "Create module",
100+
label: "Create module at `foo.rs`",
101101
group: None,
102102
target: 0..8,
103103
source_change: Some(
@@ -123,7 +123,7 @@ mod baz {}
123123
"create_module",
124124
QuickFix,
125125
),
126-
label: "Create module",
126+
label: "Create module at `foo/mod.rs`",
127127
group: None,
128128
target: 0..8,
129129
source_change: Some(

crates/rust-analyzer/tests/slow-tests/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ fn main() {}
465465
},
466466
json!([
467467
{
468-
"title": "Create module",
468+
"title": "Create module at `bar.rs`",
469469
"kind": "quickfix",
470470
"edit": {
471471
"documentChanges": [
@@ -477,7 +477,7 @@ fn main() {}
477477
}
478478
},
479479
{
480-
"title": "Create module",
480+
"title": "Create module at `bar/mod.rs`",
481481
"kind": "quickfix",
482482
"edit": {
483483
"documentChanges": [
@@ -549,7 +549,7 @@ fn main() {{}}
549549
},
550550
json!([
551551
{
552-
"title": "Create module",
552+
"title": "Create module at `bar.rs`",
553553
"kind": "quickfix",
554554
"edit": {
555555
"documentChanges": [
@@ -561,7 +561,7 @@ fn main() {{}}
561561
}
562562
},
563563
{
564-
"title": "Create module",
564+
"title": "Create module at `bar/mod.rs`",
565565
"kind": "quickfix",
566566
"edit": {
567567
"documentChanges": [

0 commit comments

Comments
 (0)