mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 04:23:25 +00:00
Pin Rust to 1.49.0 on CI
This commit is contained in:
parent
b0f20a795d
commit
70f388cedb
5 changed files with 21 additions and 11 deletions
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
|
@ -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:
|
||||
|
|
|
@ -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, _)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -398,7 +398,7 @@ impl GlobalState {
|
|||
}
|
||||
|
||||
let state_changed = self.process_changes();
|
||||
let is_ready = matches!(self.status, Status::Ready { .. } );
|
||||
let is_ready = matches!(self.status, Status::Ready { .. });
|
||||
if prev_status == Status::Loading && is_ready {
|
||||
for flycheck in &self.flycheck {
|
||||
flycheck.update();
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue