From b9414637e238c94048b0f752c6c4f32953806ce1 Mon Sep 17 00:00:00 2001 From: llogiq Date: Mon, 18 May 2015 10:52:43 +0200 Subject: [PATCH] better messages --- src/mut_mut.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mut_mut.rs b/src/mut_mut.rs index d77a40a4e..5d50e3513 100644 --- a/src/mut_mut.rs +++ b/src/mut_mut.rs @@ -26,13 +26,13 @@ impl LintPass for MutMut { unwrap_addr(expr).map(|e| { if unwrap_addr(e).is_some() { cx.span_lint(MUT_MUT, expr.span, - "We're not sure what this means, so if you know, please tell us.") + "Generally you want to avoid &mut &mut _ if possible.") } else { match expr_ty(cx.tcx, e).sty { ty_ptr(mt{ty: _, mutbl: MutMutable}) | ty_rptr(_, mt{ty: _, mutbl: MutMutable}) => cx.span_lint(MUT_MUT, expr.span, - "This expression mutably borrows a mutable reference. Consider direct reborrowing"), + "This expression mutably borrows a mutable reference. Consider reborrowing"), _ => () } } @@ -42,7 +42,7 @@ impl LintPass for MutMut { fn check_ty(&mut self, cx: &Context, ty: &Ty) { if unwrap_mut(ty).and_then(unwrap_mut).is_some() { cx.span_lint(MUT_MUT, ty.span, - "We're not sure what this means, so if you know, please tell us.") + "Generally you want to avoid &mut &mut _ if possible.") } } }