1
Fork 0

don't skip inference for type in offset_of!

This commit is contained in:
Lukas Markeffsky 2023-05-17 22:10:36 +02:00
parent 6d1bf733d6
commit 7cdb23b98a
8 changed files with 42 additions and 16 deletions

View file

@ -0,0 +1,11 @@
// Test that inference types in `offset_of!` don't ICE.
#![feature(offset_of)]
struct Foo<T> {
x: T,
}
fn main() {
let _ = core::mem::offset_of!(Foo<_>, x); //~ ERROR: type annotations needed
}