summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/issue-26448-2.rs
blob: c60e06c3ceb3504dafb7a71cfa7b5268e98c8f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// check-pass

pub struct Bar<T> {
    items: Vec<&'static str>,
    inner: T,
}

pub trait IntoBar<T> {
    fn into_bar(self) -> Bar<T>;
}

impl<'a, T> IntoBar<T> for &'a str where &'a str: Into<T> {
    fn into_bar(self) -> Bar<T> {
        Bar {
            items: Vec::new(),
            inner: self.into(),
        }
    }
}

fn main() {}