From eaaf3f67ab1a4dfa2881328bd4614bb005f0748d Mon Sep 17 00:00:00 2001 From: John Barker Date: Sun, 7 Jul 2013 22:26:15 -0400 Subject: Always eat up mut when parsing general args, fixes #7483 --- src/test/run-pass/traits-default-method-mut.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/run-pass/traits-default-method-mut.rs (limited to 'src/test') diff --git a/src/test/run-pass/traits-default-method-mut.rs b/src/test/run-pass/traits-default-method-mut.rs new file mode 100644 index 00000000000..a36f0178c15 --- /dev/null +++ b/src/test/run-pass/traits-default-method-mut.rs @@ -0,0 +1,17 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[allow(default_methods)]; + +trait Foo { + fn foo(mut v: int) { v = 1; } +} + +fn main() {} -- cgit 1.4.1-3-g733a5