]> git.proxmox.com Git - rustc.git/blob - src/test/ui/feature-gates/feature-gate-impl_trait_in_bindings.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-impl_trait_in_bindings.rs
1 const FOO: impl Copy = 42;
2 //~^ ERROR `impl Trait` not allowed
3
4 static BAR: impl Copy = 42;
5 //~^ ERROR `impl Trait` not allowed
6
7 fn main() {
8 let foo = impl Copy = 42;
9 //~^ ERROR expected expression, found keyword `impl`
10 let foo: impl Copy = 42;
11 }