diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-02-04 09:03:31 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-05-31 18:24:53 +0300 |
| commit | 408bf9de3459ffbf3b5f8844895d4f0147faad9a (patch) | |
| tree | 459ad8af6c682b404ef32b24b11503d1b6714f02 /src/test/run-pass | |
| parent | 2092963a1851efca5222bd816557055988ce8f90 (diff) | |
| download | rust-408bf9de3459ffbf3b5f8844895d4f0147faad9a.tar.gz rust-408bf9de3459ffbf3b5f8844895d4f0147faad9a.zip | |
rustc_codegen_utils: don't ignore `Ctor` path components in symbols.
Diffstat (limited to 'src/test/run-pass')
| -rw-r--r-- | src/test/run-pass/struct-ctor-mangling.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/run-pass/struct-ctor-mangling.rs b/src/test/run-pass/struct-ctor-mangling.rs new file mode 100644 index 00000000000..5f5ee7cfe44 --- /dev/null +++ b/src/test/run-pass/struct-ctor-mangling.rs @@ -0,0 +1,12 @@ +fn size_of_val<T>(_: &T) -> usize { + std::mem::size_of::<T>() +} + +struct Foo(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); +} |
