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

Update rustc to nightly-2022-04-20 #292

Merged
merged 3 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ repository and compiled from source or installed from
of the nightly toolchain is supported at any given time.

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

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

You'd also need `cmake` for some dependencies, and a few common libraries (if you hit
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: Keep in sync with nightly date on README
[toolchain]
channel = "nightly-2022-03-13"
channel = "nightly-2022-04-20"
components = ["llvm-tools-preview", "rustc-dev"]
2 changes: 1 addition & 1 deletion src/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ impl NameMapping {
Fn |
Const |
ConstParam |
Static |
Static(_) |
Ctor(_, _) |
AssocFn |
AssocConst => Some(&mut self.value_map),
Expand Down
2 changes: 1 addition & 1 deletion src/mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> {
}
(&TyKind::Opaque(_a_def_id, a_substs), &TyKind::Opaque(_b_def_id, b_substs)) => {
if self.check_substs(a_substs, b_substs) {
let _ = ty::relate::relate_substs(self, None, a_substs, b_substs)?;
let _ = ty::relate::relate_substs(self, a_substs, b_substs)?;
}

// TODO: we are talking impl trait here, so we can build a Res for that or the
Expand Down
12 changes: 6 additions & 6 deletions src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res, Res::Def};
use rustc_hir::def_id::DefId;
use rustc_hir::hir_id::HirId;
use rustc_hir::lang_items::LangItem;
use rustc_hir::Mutability;
use rustc_infer::infer::TyCtxtInferExt;
use rustc_metadata::creader::CStore;
use rustc_middle::{
Expand Down Expand Up @@ -244,12 +245,11 @@ fn diff_structure<'tcx>(
| (ForeignTy, ForeignTy)
| (ConstParam, ConstParam) => {}
// statics are subject to mutability comparison
(Static, Static) => {
let old_mut = tcx.is_mutable_static(o_def_id);
let new_mut = tcx.is_mutable_static(n_def_id);
(Static(old_mut), Static(new_mut)) => {
if old_mut != new_mut {
let change_type =
ChangeType::StaticMutabilityChanged { now_mut: new_mut };
let change_type = ChangeType::StaticMutabilityChanged {
now_mut: new_mut == Mutability::Mut,
};

changes.add_change(change_type, o_def_id, None);
}
Expand Down Expand Up @@ -888,7 +888,7 @@ fn diff_types<'tcx>(

match old {
// type aliases, consts and statics just need their type to be checked
Def(TyAlias | Const | Static, _) => {
Def(TyAlias | Const | Static(_), _) => {
cmp_types(
changes,
id_mapping,
Expand Down