mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +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
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: 1.49.0 # FIXME: CI is failing on 1.50
|
||||||
profile: minimal
|
profile: minimal
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt, rust-src
|
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
|
- name: Cache cargo directories
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -415,9 +415,9 @@ fn rename_reference(
|
||||||
) -> RenameResult<SourceChange> {
|
) -> RenameResult<SourceChange> {
|
||||||
let ident_kind = check_identifier(new_name)?;
|
let ident_kind = check_identifier(new_name)?;
|
||||||
|
|
||||||
let def_is_lbl_or_lt = matches!(def,
|
let def_is_lbl_or_lt = matches!(
|
||||||
Definition::GenericParam(hir::GenericParam::LifetimeParam(_))
|
def,
|
||||||
| Definition::Label(_)
|
Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | Definition::Label(_)
|
||||||
);
|
);
|
||||||
match (ident_kind, def) {
|
match (ident_kind, def) {
|
||||||
(IdentifierKind::ToSelf, _)
|
(IdentifierKind::ToSelf, _)
|
||||||
|
|
|
@ -169,11 +169,12 @@ fn opt_self_param(p: &mut Parser, m: Marker) {
|
||||||
let la1 = p.nth(1);
|
let la1 = p.nth(1);
|
||||||
let la2 = p.nth(2);
|
let la2 = p.nth(2);
|
||||||
let la3 = p.nth(3);
|
let la3 = p.nth(3);
|
||||||
if !matches!((p.current(), la1, la2, la3),
|
if !matches!(
|
||||||
(T![&], T![self], _, _)
|
(p.current(), la1, la2, la3),
|
||||||
| (T![&], T![mut], T![self], _)
|
(T![&], T![self], _, _)
|
||||||
| (T![&], LIFETIME_IDENT, T![self], _)
|
| (T![&], T![mut], T![self], _)
|
||||||
| (T![&], LIFETIME_IDENT, T![mut], T![self])
|
| (T![&], LIFETIME_IDENT, T![self], _)
|
||||||
|
| (T![&], LIFETIME_IDENT, T![mut], T![self])
|
||||||
) {
|
) {
|
||||||
return m.abandon(p);
|
return m.abandon(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,7 +398,7 @@ impl GlobalState {
|
||||||
}
|
}
|
||||||
|
|
||||||
let state_changed = self.process_changes();
|
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 {
|
if prev_status == Status::Loading && is_ready {
|
||||||
for flycheck in &self.flycheck {
|
for flycheck in &self.flycheck {
|
||||||
flycheck.update();
|
flycheck.update();
|
||||||
|
|
|
@ -528,7 +528,8 @@ pub(crate) fn url_from_abs_path(path: &Path) -> lsp_types::Url {
|
||||||
assert!(path.is_absolute());
|
assert!(path.is_absolute());
|
||||||
let url = lsp_types::Url::from_file_path(path).unwrap();
|
let url = lsp_types::Url::from_file_path(path).unwrap();
|
||||||
match path.components().next() {
|
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
|
// Need to lowercase driver letter
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue