]> git.lizzy.rs Git - rust.git/commit
Guarantee that statics have unique names
authorAlex Crichton <alex@alexcrichton.com>
Sun, 15 Sep 2013 06:19:11 +0000 (23:19 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 15 Sep 2013 06:19:11 +0000 (23:19 -0700)
commit1da4488d8713a4190f110407470f57ddec42ec62
treecaa89793cf87585717b81cf310c3e7a690244b3c
parent7c8f503ac543e0ffe18986b8d6f8548df21cefa3
Guarantee that statics have unique names

While they may have the same name within various scopes, this changes static
names to use path_pretty_name to append some hash information at the end of the
symbol. We're then guaranteed that each static has a unique NodeId, so this
NodeId is as the "hash" of the pretty name.

Closes #9188
src/librustc/metadata/encoder.rs
src/librustc/middle/trans/base.rs
src/test/auxiliary/issue_9188.rs [new file with mode: 0644]
src/test/run-pass/issue-9188.rs [new file with mode: 0644]