]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-57156.rs
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.git] / src / test / ui / issues / issue-57156.rs
1 // check-pass
2
3 trait Foo<Args> {
4     type Output;
5 }
6
7 trait Bar<'a, T>: for<'s> Foo<&'s T, Output=bool> {
8     fn cb(&self) -> Box<dyn Bar<'a, T, Output=bool>>;
9 }
10
11 impl<'s> Foo<&'s ()> for () {
12     type Output = bool;
13 }
14
15 impl<'a> Bar<'a, ()> for () {
16     fn cb(&self) -> Box<dyn Bar<'a, (), Output=bool>> {
17         Box::new(*self)
18     }
19 }
20
21 fn main() {
22     let _t = ().cb();
23 }