]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-27281.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-27281.rs
1 // check-pass
2 pub trait Trait<'a> {
3     type T;
4     type U;
5     fn foo(&self, s: &'a ()) -> &'a ();
6 }
7
8 impl<'a> Trait<'a> for () {
9     type T = &'a ();
10     type U = Self::T;
11
12     fn foo(&self, s: &'a ()) -> &'a () {
13         let t: Self::T = s; t
14     }
15 }
16
17 fn main() {}