mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
10 lines
221 B
Rust
10 lines
221 B
Rust
//@ run-pass
|
|
#![allow(unused_assignments)]
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
pub fn main() {
|
|
let s: String = "foobar".to_string();
|
|
let mut t: &str = &s;
|
|
t = &t[0..3]; // for master: str::view(t, 0, 3) maybe
|
|
}
|