mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 04:26:48 +00:00
rustfmt 1.4.30-stable
This commit is contained in:
parent
790bda1f85
commit
864fb063a0
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user