]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/issue-26448-2.rs
internally change regions to be covariant
[rust.git] / tests / ui / regions / issue-26448-2.rs
1 // check-pass
2
3 pub struct Bar<T> {
4     items: Vec<&'static str>,
5     inner: T,
6 }
7
8 pub trait IntoBar<T> {
9     fn into_bar(self) -> Bar<T>;
10 }
11
12 impl<'a, T> IntoBar<T> for &'a str where &'a str: Into<T> {
13     fn into_bar(self) -> Bar<T> {
14         Bar {
15             items: Vec::new(),
16             inner: self.into(),
17         }
18     }
19 }
20
21 fn main() {}