aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLuciano Bestia <[email protected]>2021-02-18 15:51:21 +0000
committerLuciano Bestia <[email protected]>2021-02-18 15:51:21 +0000
commit864fb063a000a38ce28c8c1d0153dc080faf1cdb (patch)
tree4d267deee499fd09590ac84e1f56268531996c27 /crates
parent790bda1f851eed1837415919897055f1635c066d (diff)
rustfmt 1.4.30-stable
Diffstat (limited to 'crates')
-rw-r--r--crates/parser/src/grammar/params.rs11
-rw-r--r--crates/rust-analyzer/src/to_proto.rs3
2 files changed, 8 insertions, 6 deletions
diff --git a/crates/parser/src/grammar/params.rs b/crates/parser/src/grammar/params.rs
index 6a98d7368..e313f6fb7 100644
--- a/crates/parser/src/grammar/params.rs
+++ b/crates/parser/src/grammar/params.rs
@@ -169,11 +169,12 @@ fn opt_self_param(p: &mut Parser, m: Marker) {
169 let la1 = p.nth(1); 169 let la1 = p.nth(1);
170 let la2 = p.nth(2); 170 let la2 = p.nth(2);
171 let la3 = p.nth(3); 171 let la3 = p.nth(3);
172 if !matches!((p.current(), la1, la2, la3), 172 if !matches!(
173 (T![&], T![self], _, _) 173 (p.current(), la1, la2, la3),
174 | (T![&], T![mut], T![self], _) 174 (T![&], T![self], _, _)
175 | (T![&], LIFETIME_IDENT, T![self], _) 175 | (T![&], T![mut], T![self], _)
176 | (T![&], LIFETIME_IDENT, T![mut], T![self]) 176 | (T![&], LIFETIME_IDENT, T![self], _)
177 | (T![&], LIFETIME_IDENT, T![mut], T![self])
177 ) { 178 ) {
178 return m.abandon(p); 179 return m.abandon(p);
179 } 180 }
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index c903ab523..2526f4591 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -516,7 +516,8 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url {
516 assert!(path.is_absolute()); 516 assert!(path.is_absolute());
517 let url = lsp_types::Url::from_file_path(path).unwrap(); 517 let url = lsp_types::Url::from_file_path(path).unwrap();
518 match path.components().next() { 518 match path.components().next() {
519 Some(path::Component::Prefix(prefix)) if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) => 519 Some(path::Component::Prefix(prefix))
520 if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) =>
520 { 521 {
521 // Need to lowercase driver letter 522 // Need to lowercase driver letter
522 } 523 }