mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-23 21:54:16 +00:00

Reverting file name weird-exprs.rs due to its historical use, recognition in community and references
15 lines
285 B
Rust
15 lines
285 B
Rust
//! Test that the symbol mangling of Foo-the-constructor-function versus Foo-the-type do not collide
|
|
|
|
//@ run-pass
|
|
|
|
fn size_of_val<T>(_: &T) -> usize {
|
|
std::mem::size_of::<T>()
|
|
}
|
|
|
|
struct Foo(#[allow(dead_code)] i64);
|
|
|
|
fn main() {
|
|
size_of_val(&Foo(0));
|
|
size_of_val(&Foo);
|
|
}
|