rust/tests/ui/unsafe/ranged-ctor-as-fn-ptr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
218 B
Rust
Raw Normal View History

#![feature(rustc_attrs)]
#[derive(Debug)]
#[rustc_layout_scalar_valid_range_start(2)]
struct NonZeroAndOneU8(u8);
fn main() {
let x: fn(u8) -> NonZeroAndOneU8 = NonZeroAndOneU8;
//~^ ERROR mismatched types
}