mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
13 lines
220 B
Rust
13 lines
220 B
Rust
// Check that false Copy bounds don't leak
|
|
#![feature(trivial_bounds)]
|
|
|
|
fn copy_out_string(t: &String) -> String where String: Copy {
|
|
*t
|
|
}
|
|
|
|
fn move_out_string(t: &String) -> String {
|
|
*t //~ ERROR
|
|
}
|
|
|
|
fn main() {}
|