Skip to content

Commit e0fc2af

Browse files
Merge #7651
7651: Pin Rust to 1.49.0 on CI r=jonas-schievink a=jonas-schievink Co-authored-by: Jonas Schievink <[email protected]>
2 parents b0f20a7 + 70f388c commit e0fc2af

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

.github/workflows/ci.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,19 @@ jobs:
5353
- name: Install Rust toolchain
5454
uses: actions-rs/toolchain@v1
5555
with:
56-
toolchain: stable
56+
toolchain: 1.49.0 # FIXME: CI is failing on 1.50
5757
profile: minimal
5858
override: true
5959
components: rustfmt, rust-src
6060

61+
- name: Install rustfmt
62+
uses: actions-rs/toolchain@v1
63+
with:
64+
toolchain: stable
65+
profile: minimal
66+
override: false
67+
components: rustfmt
68+
6169
- name: Cache cargo directories
6270
uses: actions/cache@v2
6371
with:

crates/ide/src/references/rename.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,9 @@ fn rename_reference(
415415
) -> RenameResult<SourceChange> {
416416
let ident_kind = check_identifier(new_name)?;
417417

418-
let def_is_lbl_or_lt = matches!(def,
419-
Definition::GenericParam(hir::GenericParam::LifetimeParam(_))
420-
| Definition::Label(_)
418+
let def_is_lbl_or_lt = matches!(
419+
def,
420+
Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | Definition::Label(_)
421421
);
422422
match (ident_kind, def) {
423423
(IdentifierKind::ToSelf, _)

crates/parser/src/grammar/params.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,12 @@ fn opt_self_param(p: &mut Parser, m: Marker) {
169169
let la1 = p.nth(1);
170170
let la2 = p.nth(2);
171171
let la3 = p.nth(3);
172-
if !matches!((p.current(), la1, la2, la3),
173-
(T![&], T![self], _, _)
174-
| (T![&], T![mut], T![self], _)
175-
| (T![&], LIFETIME_IDENT, T![self], _)
176-
| (T![&], LIFETIME_IDENT, T![mut], T![self])
172+
if !matches!(
173+
(p.current(), la1, la2, la3),
174+
(T![&], T![self], _, _)
175+
| (T![&], T![mut], T![self], _)
176+
| (T![&], LIFETIME_IDENT, T![self], _)
177+
| (T![&], LIFETIME_IDENT, T![mut], T![self])
177178
) {
178179
return m.abandon(p);
179180
}

crates/rust-analyzer/src/main_loop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ impl GlobalState {
398398
}
399399

400400
let state_changed = self.process_changes();
401-
let is_ready = matches!(self.status, Status::Ready { .. } );
401+
let is_ready = matches!(self.status, Status::Ready { .. });
402402
if prev_status == Status::Loading && is_ready {
403403
for flycheck in &self.flycheck {
404404
flycheck.update();

crates/rust-analyzer/src/to_proto.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url {
528528
assert!(path.is_absolute());
529529
let url = lsp_types::Url::from_file_path(path).unwrap();
530530
match path.components().next() {
531-
Some(path::Component::Prefix(prefix)) if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) =>
531+
Some(path::Component::Prefix(prefix))
532+
if matches!(prefix.kind(), path::Prefix::Disk(_) | path::Prefix::VerbatimDisk(_)) =>
532533
{
533534
// Need to lowercase driver letter
534535
}

0 commit comments

Comments
 (0)