2019-11-04 00:00:00 +00:00
|
|
|
//@ check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2013-05-07 17:30:21 -04:00
|
|
|
// Tests that impls are allowed to have looser, more permissive bounds
|
|
|
|
// than the traits require.
|
2012-09-05 15:36:11 -07:00
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2012-09-05 15:36:11 -07:00
|
|
|
trait A {
|
2015-02-12 10:29:52 -05:00
|
|
|
fn b<C:Sync,D>(&self, x: C) -> C;
|
2012-09-05 15:36:11 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
struct E {
|
2015-03-25 17:06:52 -07:00
|
|
|
f: isize
|
2012-09-05 15:36:11 -07:00
|
|
|
}
|
|
|
|
|
2013-02-14 11:47:00 -08:00
|
|
|
impl A for E {
|
2015-02-12 10:29:52 -05:00
|
|
|
fn b<F,G>(&self, _x: F) -> F { panic!() }
|
2012-09-05 15:36:11 -07:00
|
|
|
}
|
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {}
|