This commit is contained in:
Michael Goulet 2022-12-05 04:38:58 +00:00
parent 34d194d41c
commit d10f6b44e1
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,11 @@
//~ type annotations needed: cannot satisfy `Self: Gen<'source>`
pub trait Gen<'source> {
type Output;
fn gen<T>(&self) -> T
where
Self: for<'s> Gen<'s, Output = T>;
}
fn main() {}

View File

@ -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>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0283`.