Skip to content

Commit d10f6b4

Browse files
Add test
1 parent 34d194d commit d10f6b4

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>`
2+
|
3+
note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found
4+
--> $DIR/conflicting-bounds.rs:3:1
5+
|
6+
LL | pub trait Gen<'source> {
7+
| ^^^^^^^^^^^^^^^^^^^^^^
8+
...
9+
LL | Self: for<'s> Gen<'s, Output = T>;
10+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0283`.

0 commit comments

Comments
 (0)