mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
review comments
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user