Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--Cargo.lock18
-rw-r--r--crates/ide/src/matching_brace.rs2
-rw-r--r--crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs3
3 files changed, 6 insertions, 17 deletions
diff --git a/Cargo.lock b/Cargo.lock
index a6d1b8b8c6..b10d24fb14 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2690,12 +2690,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "smol_str"
-version = "0.3.2"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d"
+checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17"
dependencies = [
"borsh",
- "serde",
+ "serde_core",
]
[[package]]
@@ -2713,16 +2713,6 @@ dependencies = [
]
[[package]]
-name = "smol_str"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17"
-dependencies = [
- "borsh",
- "serde_core",
-]
-
-[[package]]
name = "span"
version = "0.0.0"
dependencies = [
@@ -2807,7 +2797,7 @@ dependencies = [
"rustc-hash 2.1.1",
"rustc-literal-escaper 0.0.4",
"rustc_apfloat",
- "smol_str 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smol_str 0.3.5",
"stdx",
"test-utils",
"tracing",
diff --git a/crates/ide/src/matching_brace.rs b/crates/ide/src/matching_brace.rs
index f21f3fe677..475176c547 100644
--- a/crates/ide/src/matching_brace.rs
+++ b/crates/ide/src/matching_brace.rs
@@ -1,5 +1,3 @@
-use std::collections::VecDeque;
-
use syntax::{
SourceFile, SyntaxKind, T, TextSize,
ast::{self, AstNode},
diff --git a/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs b/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs
index 98aa3da46e..201b5f8360 100644
--- a/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs
+++ b/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs
@@ -455,7 +455,8 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
tags: tag.clone().map(|tag| vec![tag]),
data: Some(serde_json::json!({ "rendered": rendered })),
},
- fix: None,
+ // i dont like it.
+ fix: subdiagnostics.iter().flat_map(|x| x.suggested_fix.clone()).next(),
});
}
diagnostics