rust/src/test/ui/impl-trait/bindings-opaque.rs

17 lines
291 B
Rust
Raw Normal View History

2018-09-11 11:55:05 -05:00
#![feature(impl_trait_in_bindings)]
const FOO: impl Copy = 42;
static BAR: impl Copy = 42;
fn main() {
let foo: impl Copy = 42;
let _ = FOO.count_ones();
2018-11-27 03:56:36 -06:00
//~^ ERROR no method
2018-09-11 11:55:05 -05:00
let _ = BAR.count_ones();
2018-11-27 03:56:36 -06:00
//~^ ERROR no method
2018-09-11 11:55:05 -05:00
let _ = foo.count_ones();
2018-11-27 03:56:36 -06:00
//~^ ERROR no method
2018-09-11 11:55:05 -05:00
}