]> git.lizzy.rs Git - rust.git/blob - tests/ui/trivial-bounds/trivial-bounds-leak-copy.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / trivial-bounds / trivial-bounds-leak-copy.rs
1 // Check that false Copy bounds don't leak
2 #![feature(trivial_bounds)]
3
4 fn copy_out_string(t: &String) -> String where String: Copy {
5     *t
6 }
7
8 fn move_out_string(t: &String) -> String {
9     *t //~ ERROR
10 }
11
12 fn main() {}