Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 40c9a3f

Browse files
committed
Auto merge of #292 - dario23:update-rustc, r=JohnTitor
Update rustc to nightly-2022-04-20 Seems i missed those in the last big upgrade PR. This should make the nightly CI job using `rustc`'s nightly `master` build green again.
2 parents 07a21d7 + 00a1d64 commit 40c9a3f

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ repository and compiled from source or installed from
2727
of the nightly toolchain is supported at any given time.
2828

2929
<!-- NOTE: Keep in sync with nightly date on rust-toolchain. -->
30-
It's recommended to use `nightly-2022-03-13` toolchain.
31-
You can install it by using `rustup install nightly-2022-03-13` if you already have rustup.
30+
It's recommended to use `nightly-2022-04-20` toolchain.
31+
You can install it by using `rustup install nightly-2022-04-20` if you already have rustup.
3232
Then you can do:
3333

3434
```sh
35-
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-03-13
36-
$ cargo +nightly-2022-03-13 install --git https://github.com/rust-lang/rust-semverver
35+
$ rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-04-20
36+
$ cargo +nightly-2022-04-20 install --git https://github.com/rust-lang/rust-semverver
3737
```
3838

3939
You'd also need `cmake` for some dependencies, and a few common libraries (if you hit

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# NOTE: Keep in sync with nightly date on README
22
[toolchain]
3-
channel = "nightly-2022-03-13"
3+
channel = "nightly-2022-04-20"
44
components = ["llvm-tools-preview", "rustc-dev"]

src/mapping.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ impl NameMapping {
344344
Fn |
345345
Const |
346346
ConstParam |
347-
Static |
347+
Static(_) |
348348
Ctor(_, _) |
349349
AssocFn |
350350
AssocConst => Some(&mut self.value_map),

src/mismatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
255255
}
256256
(&TyKind::Opaque(_a_def_id, a_substs), &TyKind::Opaque(_b_def_id, b_substs)) => {
257257
if self.check_substs(a_substs, b_substs) {
258-
let _ = ty::relate::relate_substs(self, None, a_substs, b_substs)?;
258+
let _ = ty::relate::relate_substs(self, a_substs, b_substs)?;
259259
}
260260

261261
// TODO: we are talking impl trait here, so we can build a Res for that or the

src/traverse.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res, Res::Def};
2121
use rustc_hir::def_id::DefId;
2222
use rustc_hir::hir_id::HirId;
2323
use rustc_hir::lang_items::LangItem;
24+
use rustc_hir::Mutability;
2425
use rustc_infer::infer::TyCtxtInferExt;
2526
use rustc_metadata::creader::CStore;
2627
use rustc_middle::{
@@ -244,12 +245,11 @@ fn diff_structure<'tcx>(
244245
| (ForeignTy, ForeignTy)
245246
| (ConstParam, ConstParam) => {}
246247
// statics are subject to mutability comparison
247-
(Static, Static) => {
248-
let old_mut = tcx.is_mutable_static(o_def_id);
249-
let new_mut = tcx.is_mutable_static(n_def_id);
248+
(Static(old_mut), Static(new_mut)) => {
250249
if old_mut != new_mut {
251-
let change_type =
252-
ChangeType::StaticMutabilityChanged { now_mut: new_mut };
250+
let change_type = ChangeType::StaticMutabilityChanged {
251+
now_mut: new_mut == Mutability::Mut,
252+
};
253253

254254
changes.add_change(change_type, o_def_id, None);
255255
}
@@ -888,7 +888,7 @@ fn diff_types<'tcx>(
888888

889889
match old {
890890
// type aliases, consts and statics just need their type to be checked
891-
Def(TyAlias | Const | Static, _) => {
891+
Def(TyAlias | Const | Static(_), _) => {
892892
cmp_types(
893893
changes,
894894
id_mapping,

0 commit comments

Comments
 (0)