Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Oct 7, 2019
1 parent 169b040 commit 6efcb02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ impl Mutability {
}
}

pub fn not(self) -> Self {
pub fn invert(self) -> Self {
match self {
MutMutable => MutImmutable,
MutImmutable => MutMutable,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/method/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
if let ty::Ref(region, t_type, mutability) = self_ty.kind {
let trait_type = self.tcx.mk_ref(region, ty::TypeAndMut {
ty: t_type,
mutbl: mutability.not(),
mutbl: mutability.invert(),
});
match self.lookup_probe(
span,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/method/suggest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
if needs_mut {
let trait_type = self.tcx.mk_ref(region, ty::TypeAndMut {
ty: t_type,
mutbl: mutability.not(),
mutbl: mutability.invert(),
});
err.note(&format!("you need `{}` instead of `{}`", trait_type, rcvr_ty));
}
Expand Down

0 comments on commit 6efcb02

Please sign in to comment.