summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-2311-2.rs
blob: 760d4edaa98d8f1e4ff6a236362aae6e9b1bfc2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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() { }