]>
git.proxmox.com Git - rustc.git/blob - tests/ui/regions/regions-static-bound-rpass.rs
3 fn invariant_id
<'a
,'b
>(t
: &'b
mut &'
static ()) -> &'b
mut &'
a ()
4 where 'a
: '
static { t }
5 //~^ WARN unnecessary lifetime parameter `'a`
7 fn static_id
<'a
>(t
: &'
a ()) -> &'
static ()
8 where 'a
: '
static { t }
9 //~^ WARN unnecessary lifetime parameter `'a`
11 fn static_id_indirect
<'a
,'b
>(t
: &'
a ()) -> &'
static ()
12 where 'a
: 'b
, 'b
: '
static { t }
13 //~^ WARN unnecessary lifetime parameter `'b`
15 fn ref_id
<'a
>(t
: &'
a ()) -> &'
a () where '
static: 'a { t }
21 let mut val
: &'
static () = &UNIT
;
22 invariant_id(&mut val
);
24 static_id_indirect(val
);