2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2019-02-04 01:03:31 -06:00
|
|
|
fn size_of_val<T>(_: &T) -> usize {
|
|
|
|
std::mem::size_of::<T>()
|
|
|
|
}
|
|
|
|
|
2022-07-25 15:36:03 -05:00
|
|
|
struct Foo(#[allow(unused_tuple_struct_fields)] i64);
|
2019-02-04 01:03:31 -06:00
|
|
|
|
|
|
|
// Test that the (symbol) mangling of `Foo` (the `struct` type) and that of
|
|
|
|
// `typeof Foo` (the function type of the `struct` constructor) don't collide.
|
|
|
|
fn main() {
|
|
|
|
size_of_val(&Foo(0));
|
|
|
|
size_of_val(&Foo);
|
|
|
|
}
|