about summary refs log tree commit diff
path: root/tests/ui/unsafe-binders/non-strucutral-type-diag.rs
blob: e021e9567e5c83a30f6d1e65ac3db3f5a6908e04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// regression test for <https://github.com/rust-lang/rust/issues/141422>.

#![feature(unsafe_binders)]
#![allow(incomplete_features)]

#[derive(Copy, Clone)]
struct Adt<'a>(&'a ());

const C: Option<(unsafe<'a> Adt<'a>, Box<dyn Send>)> = None;

fn main() {
    match None {
        C => {}
        //~^ ERROR constant of non-structural type
        _ => {}
    }
}