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