]> git.lizzy.rs Git - rust.git/blob - src/test/ui/trailing-comma.rs
Rollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok
[rust.git] / src / test / ui / trailing-comma.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 #![feature(slice_patterns)]
5
6 fn f<T,>(_: T,) {}
7
8 struct Foo<T,>(T);
9
10 struct Bar;
11
12 impl Bar {
13     fn f(_: isize,) {}
14     fn g(self, _: isize,) {}
15     fn h(self,) {}
16 }
17
18 enum Baz {
19     Qux(isize,),
20 }
21
22 #[allow(unused,)]
23 pub fn main() {
24     f::<isize,>(0,);
25     let (_, _,) = (1, 1,);
26     let [_, _,] = [1, 1,];
27     let [_, _, .., _,] = [1, 1, 1, 1,];
28     let [_, _, _, ..,] = [1, 1, 1, 1,];
29
30     let x: Foo<isize,> = Foo::<isize,>(1);
31
32     Bar::f(0,);
33     Bar.g(0,);
34     Bar.h();
35
36     let x = Baz::Qux(1,);
37 }