about summary refs log tree commit diff
path: root/src/test/ui/match/issue-70972-dyn-trait.rs
blob: a9b2699cafdc4956c95720b3554253ea69227dca (plain)
1
2
3
4
5
6
7
8
9
10
const F: &'static dyn Send = &7u32;

fn main() {
    let a: &dyn Send = &7u32;
    match a {
        F => panic!(),
        //~^ ERROR trait objects cannot be used in patterns
        _ => {}
    }
}