We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34d194d commit d10f6b4Copy full SHA for d10f6b4
src/test/ui/lifetimes/conflicting-bounds.rs
@@ -0,0 +1,11 @@
1
+//~ type annotations needed: cannot satisfy `Self: Gen<'source>`
2
+
3
+pub trait Gen<'source> {
4
+ type Output;
5
6
+ fn gen<T>(&self) -> T
7
+ where
8
+ Self: for<'s> Gen<'s, Output = T>;
9
+}
10
11
+fn main() {}
src/test/ui/lifetimes/conflicting-bounds.stderr
@@ -0,0 +1,14 @@
+error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>`
+ |
+note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found
+ --> $DIR/conflicting-bounds.rs:3:1
+LL | pub trait Gen<'source> {
+ | ^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | Self: for<'s> Gen<'s, Output = T>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
+error: aborting due to previous error
13
14
+For more information about this error, try `rustc --explain E0283`.
0 commit comments