summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/const_derives/derive-const-non-const-type.rs
blob: ed6699f37242029fbdcca9f87ee4ed7a040274c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![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
//~| the trait bound

fn main() {}