]> git.lizzy.rs Git - rust.git/commitdiff
rustfmt 1.4.30-stable
authorLuciano Bestia <LucianoBestia@gmail.com>
Thu, 18 Feb 2021 15:51:21 +0000 (16:51 +0100)
committerLuciano Bestia <LucianoBestia@gmail.com>
Thu, 18 Feb 2021 15:51:21 +0000 (16:51 +0100)
crates/parser/src/grammar/params.rs
crates/rust-analyzer/src/to_proto.rs

index 6a98d736862882df5b1d737c0c5a61c70d3892dc..e313f6fb7f1350a4065fd1fad5f0d3895958506e 100644 (file)
@@ -169,11 +169,12 @@ fn opt_self_param(p: &mut Parser, m: Marker) {
         let la1 = p.nth(1);
         let la2 = p.nth(2);
         let la3 = p.nth(3);
-        if !matches!((p.current(), la1, la2, la3),
-              (T![&], T![self], _, _)
-            | (T![&], T![mut], T![self], _)
-            | (T![&], LIFETIME_IDENT, T![self], _)
-            | (T![&], LIFETIME_IDENT, T![mut], T![self])
+        if !matches!(
+            (p.current(), la1, la2, la3),
+            (T![&], T![self], _, _)
+                | (T![&], T![mut], T![self], _)
+                | (T![&], LIFETIME_IDENT, T![self], _)
+                | (T![&], LIFETIME_IDENT, T![mut], T![self])
         ) {
             return m.abandon(p);
         }
index c903ab523ca1b22189ab48b3183a39eda1986123..2526f4591d8a891450ffd2dcf0b104345942b38e 100644 (file)
@@ -516,7 +516,8 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url {
     assert!(path.is_absolute());
     let url = lsp_types::Url::from_file_path(path).unwrap();
     match path.components().next() {
-        Some(path::Component::Prefix(prefix)) if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) =>
+        Some(path::Component::Prefix(prefix))
+            if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) =>
         {
             // Need to lowercase driver letter
         }