// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![allow(dead_code)] // pretty-expanded FIXME #23616 struct S { contents: T, } impl S { fn new(x: T, _: U) -> S { S { contents: x, } } } trait Trait { fn new(x: T, y: U) -> Self; } struct S2 { contents: isize, } impl Trait for S2 { fn new(x: isize, _: U) -> S2 { S2 { contents: x, } } } pub fn main() { let _ = S::::new::(1, 1.0); let _: S2 = Trait::::new::(1, 1.0); }