]> git.proxmox.com Git - rustc.git/blame - src/test/ui/anon-params-denied-2018.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / anon-params-denied-2018.rs
CommitLineData
b7449926
XL
1// Tests that anonymous parameters are a hard error in edition 2018.
2
3// edition:2018
4
5trait T {
e1599b0c 6 fn foo(i32); //~ expected one of `:`, `@`, or `|`, found `)`
b7449926
XL
7
8 fn bar_with_default_impl(String, String) {}
dc9dc135
XL
9 //~^ ERROR expected one of `:`
10 //~| ERROR expected one of `:`
11
12 // do not complain about missing `b`
13 fn baz(a:usize, b, c: usize) -> usize { //~ ERROR expected one of `:`
14 a + b + c
15 }
b7449926
XL
16}
17
18fn main() {}