about summary refs log tree commit diff
path: root/src/test/ui/const-generics/issues/issue-67739.rs
blob: e4960e56c9e4ea7ce9e875860b19a5b6c23ab78f (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(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]

use std::mem;

pub trait Trait {
    type Associated: Sized;

    fn associated_size(&self) -> usize {
        [0u8; mem::size_of::<Self::Associated>()];
        //~^ ERROR constant expression depends on a generic parameter
        0
    }
}

fn main() {}