Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dario23 committed May 4, 2022
1 parent 52314c8 commit ea7321c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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-02-15"
channel = "nightly-2022-02-16"
components = ["llvm-tools-preview", "rustc-dev"]
12 changes: 6 additions & 6 deletions src/mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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();
Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,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
Expand Down

0 comments on commit ea7321c

Please sign in to comment.