Pin Rust to 1.49.0 on CI

This commit is contained in:
Jonas Schievink 2021-02-12 12:09:54 +01:00
parent b0f20a795d
commit 70f388cedb
5 changed files with 21 additions and 11 deletions

View file

@ -53,11 +53,19 @@ jobs:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.49.0 # FIXME: CI is failing on 1.50
profile: minimal
override: true
components: rustfmt, rust-src
- name: Install rustfmt
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: false
components: rustfmt
- name: Cache cargo directories
uses: actions/cache@v2
with:

View file

@ -415,9 +415,9 @@ fn rename_reference(
) -> RenameResult<SourceChange> {
let ident_kind = check_identifier(new_name)?;
let def_is_lbl_or_lt = matches!(def,
Definition::GenericParam(hir::GenericParam::LifetimeParam(_))
| Definition::Label(_)
let def_is_lbl_or_lt = matches!(
def,
Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | Definition::Label(_)
);
match (ident_kind, def) {
(IdentifierKind::ToSelf, _)

View file

@ -169,7 +169,8 @@ 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),
if !matches!(
(p.current(), la1, la2, la3),
(T![&], T![self], _, _)
| (T![&], T![mut], T![self], _)
| (T![&], LIFETIME_IDENT, T![self], _)

View file

@ -528,7 +528,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
}