summaryrefslogtreecommitdiffstats
path: root/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs
new file mode 100644
index 000000000..9b793642d
--- /dev/null
+++ b/tests/ui/implied-bounds/implied-bounds-entailment-wf-vars-issue-114783-1.rs
@@ -0,0 +1,26 @@
+// check-pass
+
+pub trait Foo {
+ type Error: Error;
+
+ fn foo(&self, stream: &<Self::Error as Error>::Span);
+}
+
+pub struct Wrapper<Inner>(Inner);
+
+impl<E: Error, Inner> Foo for Wrapper<Inner>
+where
+ Inner: Foo<Error = E>,
+{
+ type Error = E;
+
+ fn foo(&self, stream: &<Self::Error as Error>::Span) {
+ todo!()
+ }
+}
+
+pub trait Error {
+ type Span;
+}
+
+fn main() {}