2024-02-16 14:02:50 -06:00
|
|
|
//@ edition:2018
|
|
|
|
//@ compile-flags: -Z mir-opt-level=3
|
2020-10-20 03:07:41 -05:00
|
|
|
|
|
|
|
#[inline(always)]
|
2020-11-14 18:00:00 -06:00
|
|
|
pub fn copy_prop(s: bool) -> String {
|
2020-10-20 03:07:41 -05:00
|
|
|
let a = "Hello world!".to_string();
|
|
|
|
let b = a;
|
|
|
|
let c = b;
|
|
|
|
if s {
|
|
|
|
c
|
|
|
|
} else {
|
|
|
|
String::new()
|
|
|
|
}
|
|
|
|
}
|
2020-11-14 18:00:00 -06:00
|
|
|
|
|
|
|
#[inline(always)]
|
|
|
|
pub fn dest_prop(x: &[u8]) -> &[u8] {
|
|
|
|
let y = &x[..x.len()];
|
|
|
|
y
|
|
|
|
}
|