From 310a4aded48b1b6340ed9328030da01c4813d573 Mon Sep 17 00:00:00 2001 From: Johannes Schilling Date: Wed, 4 May 2022 16:57:50 +0200 Subject: [PATCH] Rustup to rust-lang/rust#93148 --- rust-toolchain | 2 +- src/mismatch.rs | 12 ++++++------ src/traverse.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rust-toolchain b/rust-toolchain index 1a5233fa..f1903bc0 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ # NOTE: Keep in sync with nightly date on README [toolchain] -channel = "nightly-2022-02-15" +channel = "nightly-2022-02-16" components = ["llvm-tools-preview", "rustc-dev"] diff --git a/src/mismatch.rs b/src/mismatch.rs index cc8dc1f1..66c38aeb 100644 --- a/src/mismatch.rs +++ b/src/mismatch.rs @@ -140,7 +140,7 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> { // could potentially short-circuit somewhere). let dummy_type = self.tcx.types.unit; - if self.current_old_types.contains(a) || self.current_new_types.contains(b) { + if self.current_old_types.contains(&a) || self.current_new_types.contains(&b) { return Ok(dummy_type); } @@ -270,8 +270,8 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> { _ => None, }; - self.current_old_types.remove(a); - self.current_new_types.remove(b); + self.current_old_types.remove(&a); + self.current_new_types.remove(&b); if let Some((old, new)) = matching { let old_def_id = old.def_id(); @@ -298,9 +298,9 @@ impl<'a, 'tcx> TypeRelation<'tcx> for MismatchRelation<'a, 'tcx> { fn consts( &mut self, - a: &'tcx ty::Const<'tcx>, - _: &'tcx ty::Const<'tcx>, - ) -> RelateResult<'tcx, &'tcx ty::Const<'tcx>> { + a: ty::Const<'tcx>, + _: ty::Const<'tcx>, + ) -> RelateResult<'tcx, ty::Const<'tcx>> { Ok(a) // TODO } diff --git a/src/traverse.rs b/src/traverse.rs index 8433bada..8be48a1a 100644 --- a/src/traverse.rs +++ b/src/traverse.rs @@ -1111,7 +1111,7 @@ fn is_impl_trait_public<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId) -> bool { TyKind::Array(t, _) | TyKind::Slice(t) | TyKind::RawPtr(TypeAndMut { ty: t, .. }) - | TyKind::Ref(_, t, _) => type_visibility(tcx, t), + | TyKind::Ref(_, t, _) => type_visibility(tcx, *t), TyKind::Bool | TyKind::Char