]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-67739.rs
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / const-generics / issues / issue-67739.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(generic_const_exprs))]
3 #![cfg_attr(full, allow(incomplete_features))]
4
5 use std::mem;
6
7 pub trait Trait {
8     type Associated: Sized;
9
10     fn associated_size(&self) -> usize {
11         [0u8; mem::size_of::<Self::Associated>()];
12         //[min]~^ ERROR constant expression depends on a generic parameter
13         //[full]~^^ ERROR unconstrained generic constant
14         0
15     }
16 }
17
18 fn main() {}