rust/tests/ui/offset-of/offset-of-inference.rs
2024-01-19 20:38:51 +00:00

10 lines
181 B
Rust

// Test that inference types in `offset_of!` don't ICE.
struct Foo<T> {
x: T,
}
fn main() {
let _ = core::mem::offset_of!(Foo<_>, x); //~ ERROR: type annotations needed
}