]>
git.proxmox.com Git - rustc.git/blob - tests/ui/traits/kindck-owned-contains-1.rs
2 #![allow(non_snake_case)]
3 #![allow(non_camel_case_types)]
5 trait repeat
<A
> { fn get(&self) -> A; }
7 impl<A
:Clone
+ '
static> repeat
<A
> for Box
<A
> {
13 fn repeater
<A
:Clone
+ '
static>(v
: Box
<A
>) -> Box
<dyn repeat
<A
>+'
static> {
14 Box
::new(v
) as Box
<dyn repeat
<A
>+'
static> // No
19 let y
= repeater(Box
::new(x
));
20 assert_eq
!(x
, y
.get());