summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
blob: 116c3fcfb2170626b739db135aed4b094bd4d7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]

trait A {}
struct B;
impl A for B {}

fn test<const T: &'static dyn A>() {
    //[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
    //[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden
    unimplemented!()
}

fn main() {
    test::<{ &B }>();
}