mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
fix: Show the path to be created in the unresolved-module fix label
This commit is contained in:
parent
46d7ee68f2
commit
3a847eacc8
@ -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(
|
||||
|
@ -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": [
|
||||
|
Loading…
Reference in New Issue
Block a user