summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/issue-26448-3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/regions/issue-26448-3.rs')
-rw-r--r--tests/ui/regions/issue-26448-3.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/regions/issue-26448-3.rs b/tests/ui/regions/issue-26448-3.rs
new file mode 100644
index 000000000..d48022c09
--- /dev/null
+++ b/tests/ui/regions/issue-26448-3.rs
@@ -0,0 +1,25 @@
+// check-pass
+
+pub struct Item {
+ _inner: &'static str,
+}
+
+pub struct Bar<T> {
+ items: Vec<Item>,
+ 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() {}