]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/trait-generic-static-default-method.rs
Add verbose option to rustdoc in order to fix problem with --version
[rust.git] / src / test / debuginfo / trait-generic-static-default-method.rs
1 // ignore-test
2
3 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
4 // file at the top-level directory of this distribution and at
5 // http://rust-lang.org/COPYRIGHT.
6 //
7 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10 // option. This file may not be copied, modified, or distributed
11 // except according to those terms.
12
13 // compile-flags:-g
14
15 // === GDB TESTS ===================================================================================
16
17 // gdb-command:run
18
19 // gdb-command:print arg1
20 // gdb-check:$1 = 1000
21 // gdb-command:print arg2
22 // gdb-check:$2 = 0.5
23 // gdb-command:continue
24
25 // gdb-command:print arg1
26 // gdb-check:$3 = 2000
27 // gdb-command:print *arg2
28 // gdb-check:$4 = {1, 2, 3}
29 // gdb-command:continue
30
31
32 // === LLDB TESTS ==================================================================================
33
34 // lldb-command:run
35
36 // lldb-command:print arg1
37 // lldb-check:[...]$0 = 1000
38 // lldb-command:print arg2
39 // lldb-check:[...]$1 = 0.5
40 // lldb-command:continue
41
42 // lldb-command:print arg1
43 // lldb-check:[...]$2 = 2000
44 // lldb-command:print *arg2
45 // lldb-check:[...]$3 = (1, 2, 3)
46 // lldb-command:continue
47
48 struct Struct {
49     x: int
50 }
51
52 trait Trait {
53     fn generic_static_default_method<T>(arg1: int, arg2: T) -> int {
54         zzz(); // #break
55         arg1
56     }
57 }
58
59 impl Trait for Struct {}
60
61 fn main() {
62
63     // Is this really how to use these?
64     Trait::generic_static_default_method::<Struct, float>(1000, 0.5);
65     Trait::generic_static_default_method::<Struct, &(int, int, int)>(2000, &(1, 2, 3));
66
67 }
68
69 fn zzz() {()}