]> git.proxmox.com Git - rustc.git/blame - src/test/ui/run-pass/issues/issue-10436.rs
New upstream version 1.30.0+dfsg1
[rustc.git] / src / test / ui / run-pass / issues / issue-10436.rs
CommitLineData
1a4d82fc 1// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
223e47cc
LB
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
b7449926 11// run-pass
c1a9b12d 12fn works<T>(x: T) -> Vec<T> { vec![x] }
85aaf69f 13
c1a9b12d 14fn also_works<T: Clone>(x: T) -> Vec<T> { vec![x] }
223e47cc 15
c1a9b12d
SL
16fn main() {
17 let _: Vec<usize> = works(0);
18 let _: Vec<usize> = also_works(0);
19 let _ = works(0);
20 let _ = also_works(0);
21}