review comments

This commit is contained in:
Esteban Küber
2019-10-06 18:38:15 -07:00
parent 4fcaa4a283
commit 2c6bcac535
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1054,7 +1054,7 @@ pub fn and(self, other: Self) -> Self {
}
}
pub fn not(self) -> Self {
pub fn invert(self) -> Self {
match self {
MutMutable => MutImmutable,
MutImmutable => MutMutable,
+1 -1
View File
@@ -217,7 +217,7 @@ pub fn lookup_method(
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,
+1 -1
View File
@@ -582,7 +582,7 @@ macro_rules! report_function {
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));
}