mirror of
https://git.proxmox.com/git/rustc
synced 2025-07-12 21:07:59 +00:00
20 lines
283 B
Rust
20 lines
283 B
Rust
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() {}
|