Rollup merge of #35505 - futile:test_29053, r=nikomatsakis
Add test for issue #29053 This PR adds a test for #29053 (currently fails on stage 0, but works with stage 1, as it should). Fixes #29053
This commit is contained in:
commit
ea342549a8
21
src/test/run-pass/issue-29053.rs
Normal file
21
src/test/run-pass/issue-29053.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright 2016 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 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
let x: &'static str = "x";
|
||||
|
||||
{
|
||||
let y = "y".to_string();
|
||||
let ref mut x = &*x;
|
||||
*x = &*y;
|
||||
}
|
||||
|
||||
assert_eq!(x, "x");
|
||||
}
|
Loading…
Reference in New Issue
Block a user