don't skip inference for type in offset_of!
This commit is contained in:
parent
6d1bf733d6
commit
7cdb23b98a
8 changed files with 42 additions and 16 deletions
11
tests/ui/offset-of/offset-of-inference.rs
Normal file
11
tests/ui/offset-of/offset-of-inference.rs
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue