blob: 8a3fe3d1c2cebe2692a1ad31ea3a1b6521220b6f [file] [log] [blame]
Patrick Walton4f32a2d2013-08-20 00:24:041// xfail-test
2
Michael Woerister5abb7c32013-08-15 16:24:053// Copyright 2013 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
Alex Crichton071ee962014-02-07 03:57:0913// compile-flags:-g
Michael Woerister93d63282013-09-06 14:00:0814// debugger:rbreak zzz
Michael Woerister5abb7c32013-08-15 16:24:0515// debugger:run
16
17// debugger:finish
18// debugger:print arg1
19// check:$1 = 1000
20// debugger:print *arg2
21// check:$2 = {1, 2.5}
22// debugger:continue
23
24// debugger:finish
25// debugger:print arg1
26// check:$3 = 2000
27// debugger:print *arg2
28// check:$4 = {3.5, {4, 5, 6}}
29// debugger:continue
30
31
32struct Struct {
33 x: int
34}
35
36trait Trait<T1> {
37 fn generic_static_default_method<T2>(arg1: int, arg2: &(T1, T2)) -> int {
38 zzz();
39 arg1
40 }
41}
42
Alex Crichton4b266f12013-09-19 19:09:5243impl<T> Trait<T> for Struct {}
Michael Woerister5abb7c32013-08-15 16:24:0544
45fn main() {
46
47 // Is this really how to use these?
48 Trait::generic_static_default_method::<int, Struct, float>(1000, &(1, 2.5));
49 Trait::generic_static_default_method::<float, Struct, (int, int, int)>(2000, &(3.5, (4, 5, 6)));
50
51}
52
53fn zzz() {()}