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