]>
git.proxmox.com Git - rustc.git/blob - tests/ui/higher-rank-trait-bounds/hrtb-trait-object-paren-notation.rs
2 // A basic test of using a higher-ranked trait bound.
5 fn call(&self, arg
: A
) -> R
;
8 type FnObject
<'b
> = dyn for<'a
> FnLike
<(&'a
i32,), &'a
i32> + 'b
;
12 impl<'a
, T
> FnLike
<(&'a T
,), &'a T
> for Identity
{
13 fn call(&self, (arg
,): (&'a T
,)) -> &'a T
{
18 fn call_repeatedly(f
: &FnObject
) {
20 let y
= f
.call((&x
,));
25 call_repeatedly(&Identity
);