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

Update toolchain to nightly-2022-05-16 #298

Merged
merged 2 commits into from
May 21, 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
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-04-20"
channel = "nightly-2022-05-16"
components = ["llvm-tools-preview", "rustc-dev"]
4 changes: 2 additions & 2 deletions src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ pub enum ChangeCategory {

pub use self::ChangeCategory::*;

impl<'a> Default for ChangeCategory {
impl Default for ChangeCategory {
fn default() -> Self {
Patch
}
}

impl<'a> fmt::Display for ChangeCategory {
impl fmt::Display for ChangeCategory {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let desc = match *self {
Patch => "patch",
Expand Down
20 changes: 8 additions & 12 deletions src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ use rustc_middle::{
metadata::ModChild,
ty::{
subst::{InternalSubsts, Subst},
AssocItem, GenericParamDef, GenericParamDefKind, Generics, TraitRef, Ty, TyCtxt, TyKind,
TypeAndMut, Visibility,
AssocItem, EarlyBinder, GenericParamDef, GenericParamDefKind, Generics, TraitRef, Ty,
TyCtxt, TyKind, TypeAndMut, Visibility,
Visibility::Public,
},
};
Expand Down Expand Up @@ -970,12 +970,10 @@ fn cmp_types<'tcx>(
} else {
compcx.compute_target_default_substs(target_def_id)
};
let target = target.subst(infcx.tcx, target_substs);
let target = EarlyBinder(target).subst(infcx.tcx, target_substs);

let target_param_env = infcx
.tcx
.param_env(target_def_id)
.subst(infcx.tcx, target_substs);
let target_param_env =
EarlyBinder(infcx.tcx.param_env(target_def_id)).subst(infcx.tcx, target_substs);

if let Some(err) =
compcx.check_type_error(tcx, target_def_id, target_param_env, orig, target)
Expand Down Expand Up @@ -1255,10 +1253,8 @@ fn match_inherent_impl<'tcx>(
.translate_item_type(orig_impl_def_id, infcx.tcx.type_of(orig_impl_def_id));

let target_substs = compcx.compute_target_infer_substs(target_item_def_id);
let target_self = infcx
.tcx
.type_of(target_impl_def_id)
.subst(infcx.tcx, target_substs);
let target_self =
EarlyBinder(infcx.tcx.type_of(target_impl_def_id)).subst(infcx.tcx, target_substs);

let target_param_env = infcx.tcx.param_env(target_impl_def_id);

Expand Down Expand Up @@ -1316,7 +1312,7 @@ fn match_inherent_impl<'tcx>(
let orig = compcx
.forward_trans
.translate_item_type(orig_item_def_id, orig);
let target = target.subst(infcx.tcx, target_substs);
let target = EarlyBinder(target).subst(infcx.tcx, target_substs);

let error =
compcx.check_type_error(tcx, target_item_def_id, target_param_env, orig, target);
Expand Down