about summary refs log tree commit diff
path: root/tests/ui/symbol-names/struct-constructor-mangling.rs
blob: ec8791e2154910974f148021f599fdc4eee525c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! 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);
}