summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs
blob: 92843a8a2da488391b596b5ac51793c5a7975787 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(derive_const)]

pub struct A;

impl Default for A {
    fn default() -> A { A }
}

#[derive_const(Default)]
pub struct S(A);
//~^ cannot call non-const fn

fn main() {}