rust/src/test/ui/const-generics/raw-ptr-const-param.rs

10 lines
317 B
Rust
Raw Normal View History

#![feature(const_generics, const_compare_raw_pointers)]
2020-04-22 03:21:32 -05:00
//~^ WARN the feature `const_generics` is incomplete
struct Const<const P: *const u32>;
fn main() {
let _: Const<{ 15 as *const _ }> = Const::<{ 10 as *const _ }>; //~ mismatched types
let _: Const<{ 10 as *const _ }> = Const::<{ 10 as *const _ }>;
}