Add test
This commit is contained in:
parent
34d194d41c
commit
d10f6b44e1
2 changed files with 25 additions and 0 deletions
11
src/test/ui/lifetimes/conflicting-bounds.rs
Normal file
11
src/test/ui/lifetimes/conflicting-bounds.rs
Normal 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() {}
|
14
src/test/ui/lifetimes/conflicting-bounds.stderr
Normal file
14
src/test/ui/lifetimes/conflicting-bounds.stderr
Normal 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`.
|
Loading…
Add table
Add a link
Reference in a new issue