From d659d039b6b6e3c5c858baf7e2be82dfee4c35d3 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 4 Sep 2015 07:56:52 +0200 Subject: [PATCH] methods: allow &mut self for as_ methods --- src/methods.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/methods.rs b/src/methods.rs index c6f0b1c2e..1d0ac662c 100644 --- a/src/methods.rs +++ b/src/methods.rs @@ -108,7 +108,7 @@ impl LintPass for MethodsPass { const CONVENTIONS: [(&'static str, &'static [SelfKind]); 5] = [ ("into_", &[ValueSelf]), ("to_", &[RefSelf]), - ("as_", &[RefSelf]), + ("as_", &[RefSelf, RefMutSelf]), ("is_", &[RefSelf, NoSelf]), ("from_", &[NoSelf]), ];