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