]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/alignment-gep-tup-like-1.rs
Ignore tests broken by failing on ICE
[rust.git] / src / test / run-pass / alignment-gep-tup-like-1.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 struct pair<A,B> {
12     a: A, b: B
13 }
14
15 trait Invokable<A> {
16     fn f(&self) -> (A, u16);
17 }
18
19 struct Invoker<A> {
20     a: A,
21     b: u16,
22 }
23
24 impl<A:Clone> Invokable<A> for Invoker<A> {
25     fn f(&self) -> (A, u16) {
26         (self.a.clone(), self.b)
27     }
28 }
29
30 fn f<A:Clone + 'static>(a: A, b: u16) -> ~Invokable<A>: {
31     ~Invoker {
32         a: a,
33         b: b,
34     } as ~Invokable<A>:
35 }
36
37 pub fn main() {
38     let (a, b) = f(22_u64, 44u16).f();
39     println!("a={:?} b={:?}", a, b);
40     assert_eq!(a, 22u64);
41     assert_eq!(b, 44u16);
42 }