From 374da5b16daccf15872f939772e682001bf0da8a Mon Sep 17 00:00:00 2001 From: Brian Koropoff Date: Tue, 28 Oct 2014 00:03:02 -0700 Subject: [PATCH] Add regression test for issue #17361 --- src/test/run-pass/issue-17361.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/run-pass/issue-17361.rs diff --git a/src/test/run-pass/issue-17361.rs b/src/test/run-pass/issue-17361.rs new file mode 100644 index 000000000000..fa38dcc19867 --- /dev/null +++ b/src/test/run-pass/issue-17361.rs @@ -0,0 +1,16 @@ +// Copyright 2014 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. + +// Test that astconv doesn't forget about mutability of &mut str + +fn main() { + fn foo(_: &mut T) {} + let _f: fn(&mut str) = foo; +}