2024-02-16 14:02:50 -06:00
|
|
|
//@ build-pass
|
2023-06-01 19:41:02 -05:00
|
|
|
// regression test for #112051, not in `offset-of-dst` as the issue is in codegen,
|
|
|
|
// and isn't triggered in the presence of typeck errors
|
2023-05-29 16:55:40 -05:00
|
|
|
|
|
|
|
struct S<T: ?Sized> {
|
|
|
|
a: u64,
|
|
|
|
b: T,
|
|
|
|
}
|
|
|
|
trait Tr {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _a = core::mem::offset_of!(S<dyn Tr>, a);
|
|
|
|
let _b = core::mem::offset_of!((u64, dyn Tr), 0);
|
|
|
|
}
|