2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
trait clam<A> {
|
|
|
|
fn get(self) -> A;
|
|
|
|
}
|
|
|
|
|
2013-01-28 10:46:43 -08:00
|
|
|
struct foo<A> {
|
2012-09-06 19:40:15 -07:00
|
|
|
x: A,
|
2012-09-07 19:04:40 -07:00
|
|
|
}
|
|
|
|
|
2013-07-10 14:43:25 -07:00
|
|
|
impl<A> foo<A> {
|
2013-08-17 08:37:42 -07:00
|
|
|
pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
|
2014-10-09 15:17:22 -04:00
|
|
|
panic!();
|
2012-07-13 13:03:21 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-10 14:43:25 -07:00
|
|
|
fn foo<A>(b: A) -> foo<A> {
|
2012-09-05 15:58:43 -07:00
|
|
|
foo {
|
|
|
|
x: b
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() { }
|