Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Dec 14, 2022
1 parent 34d194d commit d10f6b4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/lifetimes/conflicting-bounds.rs
Original file line number Diff line number Diff line change
@@ -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() {}
14 changes: 14 additions & 0 deletions src/test/ui/lifetimes/conflicting-bounds.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit d10f6b4

Please sign in to comment.