rust/src/test/ui/feature-gates/feature-gate-impl_trait_in_bindings.rs
2018-12-25 21:08:33 -07:00

12 lines
255 B
Rust

const FOO: impl Copy = 42;
//~^ ERROR `impl Trait` not allowed
static BAR: impl Copy = 42;
//~^ ERROR `impl Trait` not allowed
fn main() {
let foo = impl Copy = 42;
//~^ ERROR expected expression, found keyword `impl`
let foo: impl Copy = 42;
}