diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/regions/issue-26448-2.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/regions/issue-26448-2.rs b/src/test/ui/regions/issue-26448-2.rs new file mode 100644 index 000000000..c60e06c3c --- /dev/null +++ b/src/test/ui/regions/issue-26448-2.rs @@ -0,0 +1,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() {} |