]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-bound.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-bound.rs
1 // run-pass
2 #![allow(dead_code)]
3 // Make sure const bounds work on things, and test that a few types
4 // are const.
5
6 // pretty-expanded FIXME #23616
7
8 fn foo<T: Sync>(x: T) -> T { x }
9
10 struct F { field: isize }
11
12 pub fn main() {
13     /*foo(1);
14     foo("hi".to_string());
15     foo(vec![1, 2, 3]);
16     foo(F{field: 42});
17     foo((1, 2));
18     foo(@1);*/
19     foo(Box::new(1));
20 }