rust/src/test/ui/const-generics/issues/issue-67739.rs

19 lines
347 B
Rust
Raw Normal View History

2020-03-12 19:04:14 -05:00
// Regression test for #67739
#![allow(incomplete_features)]
#![feature(const_generics)]
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
2020-03-12 19:04:14 -05:00
0
}
}
fn main() {}