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