rust/tests/ui/issues/issue-2311-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
307 B
Rust
Raw Normal View History

//@ check-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
trait clam<A> {
fn get(self) -> A;
}
struct foo<A> {
2012-09-07 02:40:15 +00:00
x: A,
}
impl<A> foo<A> {
2013-08-17 15:37:42 +00:00
pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
panic!();
2012-07-13 20:03:21 +00:00
}
}
fn foo<A>(b: A) -> foo<A> {
2012-09-05 22:58:43 +00:00
foo {
x: b
}
}
pub fn main() { }