rust/tests/ui/const-generics/min_const_generics/self-ty-in-const-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
283 B
Rust
Raw Normal View History

2020-09-01 12:30:16 +00:00
struct Bar<T>(T);
trait Baz {
fn hey();
}
impl Baz for u16 {
fn hey() {
let _: [u8; std::mem::size_of::<Self>()]; // ok
}
}
impl<T> Baz for Bar<T> {
fn hey() {
let _: [u8; std::mem::size_of::<Self>()]; //~ERROR generic `Self`
}
}
fn main() {}