mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
12 lines
205 B
Rust
12 lines
205 B
Rust
|
// 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
|
||
|
}
|