]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/struct-ctor-mangling.rs
rustc_codegen_utils: don't ignore `Ctor` path components in symbols.
[rust.git] / src / test / run-pass / struct-ctor-mangling.rs
1 fn size_of_val<T>(_: &T) -> usize {
2     std::mem::size_of::<T>()
3 }
4
5 struct Foo(i64);
6
7 // Test that the (symbol) mangling of `Foo` (the `struct` type) and that of
8 // `typeof Foo` (the function type of the `struct` constructor) don't collide.
9 fn main() {
10     size_of_val(&Foo(0));
11     size_of_val(&Foo);
12 }