rust/tests/ui/offset-of/offset-of-inference.rs

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

12 lines
205 B
Rust
Raw Normal View History

// 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
}