mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
27 lines
306 B
Rust
27 lines
306 B
Rust
// check-pass
|
|
#![allow(dead_code)]
|
|
#![allow(non_camel_case_types)]
|
|
|
|
|
|
trait clam<A> {
|
|
fn get(self) -> A;
|
|
}
|
|
|
|
struct foo<A> {
|
|
x: A,
|
|
}
|
|
|
|
impl<A> foo<A> {
|
|
pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
|
|
panic!();
|
|
}
|
|
}
|
|
|
|
fn foo<A>(b: A) -> foo<A> {
|
|
foo {
|
|
x: b
|
|
}
|
|
}
|
|
|
|
pub fn main() { }
|