]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-27281.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-27281.rs
1 // build-pass (FIXME(62277): could be 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() {}