mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
10 lines
181 B
Rust
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
|
||
|
}
|