diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 8fa9df4e69a..ac0fdf85a77 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -1277,7 +1277,7 @@ macro_rules! create_bool_or_string_de { impl<'de> serde::de::Visitor<'de> for V { type Value = (); - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { formatter.write_str(concat!( stringify!($bool), " or \"", @@ -1344,7 +1344,7 @@ macro_rules! named_unit_variant { struct V; impl<'de> serde::de::Visitor<'de> for V { type Value = (); - fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str(concat!("\"", stringify!($variant), "\"")) } fn visit_str(self, value: &str) -> Result { @@ -1405,7 +1405,7 @@ where impl<'de> serde::de::Visitor<'de> for SingleOrVec { type Value = Vec; - fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { formatter.write_str("string or array of strings") } diff --git a/crates/rust-analyzer/src/diff.rs b/crates/rust-analyzer/src/diff.rs index 231be580778..3fcfb4a1b08 100644 --- a/crates/rust-analyzer/src/diff.rs +++ b/crates/rust-analyzer/src/diff.rs @@ -7,7 +7,7 @@ pub(crate) fn diff(left: &str, right: &str) -> TextEdit { textedit_from_chunks(chunks) } -fn textedit_from_chunks(chunks: Vec) -> TextEdit { +fn textedit_from_chunks(chunks: Vec>) -> TextEdit { let mut builder = TextEdit::builder(); let mut pos = TextSize::default(); diff --git a/crates/rust-analyzer/src/lib.rs b/crates/rust-analyzer/src/lib.rs index 4b1e0cd5aeb..552379752fa 100644 --- a/crates/rust-analyzer/src/lib.rs +++ b/crates/rust-analyzer/src/lib.rs @@ -72,7 +72,7 @@ impl LspError { } impl fmt::Display for LspError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "Language Server request failed with {}. ({})", self.code, self.message) } } diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index 0579cae4ed0..5845cf712c8 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs @@ -75,8 +75,8 @@ pub(crate) enum PrimeCachesProgress { } impl fmt::Debug for Event { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let debug_verbose_not = |not: &Notification, f: &mut fmt::Formatter| { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let debug_verbose_not = |not: &Notification, f: &mut fmt::Formatter<'_>| { f.debug_struct("Notification").field("method", ¬.method).finish() };