granite-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
306 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-06 19:40:15 -07:00
x: A,
}
impl<A> foo<A> {
2013-08-17 08:37:42 -07:00
pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
panic!();
2012-07-13 13:03:21 -07:00
}
}
fn foo<A>(b: A) -> foo<A> {
2012-09-05 15:58:43 -07:00
foo {
x: b
}
}
pub fn main() { }