2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
2019-02-04 09:03:31 +02:00
|
|
|
fn size_of_val<T>(_: &T) -> usize {
|
|
|
|
std::mem::size_of::<T>()
|
|
|
|
}
|
|
|
|
|
2023-12-27 17:11:58 -05:00
|
|
|
struct Foo(#[allow(dead_code)] i64);
|
2019-02-04 09:03:31 +02: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);
|
|
|
|
}
|