]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-bound.rs
Rollup merge of #106951 - tmiasko:rm-simplify-initial, r=oli-obk
[rust.git] / tests / 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 }