]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/self/where-for-self.rs
2 // Test that we can quantify lifetimes outside a constraint (i.e., including
3 // the self type) in a where clause.
6 static mut COUNT
: u32 = 1;
17 impl<'a
, 'b
> Bar
<'b
> for &'a
u32 {
19 unsafe { COUNT *= 2; }
23 impl<'a
, 'b
> Baz
<'b
> for &'a
u32 {
25 unsafe { COUNT *= 3; }
29 // Test we can use the syntax for HRL including the self type.
31 where for<'a
, 'b
> &'a T
: Bar
<'b
>
36 // Test we can quantify multiple bounds (i.e., the precedence is sensible).
38 where for<'a
, 'b
> &'a T
: Bar
<'b
> + Baz
<'b
>
49 assert_eq
!(COUNT
, 12);