Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
trivial-bounds
/
trivial-bounds-leak-copy.rs
blob: cecc0b2da0eb5c256f46a3258dcea288dbb8f4af [
file
] [
log
] [
blame
] [
edit
]
// 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
()
{}