1 fn prove_static<T: 'static + ?Sized>(_: &'static T) {}
3 fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
6 let slice: &mut [_] = &mut out;
10 //~^ ERROR explicit lifetime required in the type of `y` [E0621]
13 struct Struct<T, U: ?Sized> {
18 fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
19 let mut out = Struct { head: x, _tail: [()] };
21 let dst: &mut Struct<_, [()]> = &mut out;
25 //~^ ERROR explicit lifetime required in the type of `y` [E0621]
29 prove_static(lifetime_transmute_slice("", &String::from("foo")));
30 prove_static(lifetime_transmute_struct("", &String::from("bar")));