blob: ba6abbf03a539f6d15cc1f4052389b636398b13a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// run-pass
fn size_of_val<T>(_: &T) -> usize {
std::mem::size_of::<T>()
}
struct Foo(#[allow(unused_tuple_struct_fields)] i64);
// 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);
}
|