]> git.lizzy.rs Git - rust.git/commit
rustc: Don't allow priv use to shadow pub use
authorAlex Crichton <alex@alexcrichton.com>
Tue, 8 Apr 2014 22:10:41 +0000 (15:10 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 10 Apr 2014 22:22:01 +0000 (15:22 -0700)
commit1f2c18a0afd55bf3a5319d9e3810ec1ac6b3e1bb
tree7cae8ac126922eee38607c2a0032c85cdad7ba0d
parentdf533c6e87f5052667b0c03c918f95b51439fdba
rustc: Don't allow priv use to shadow pub use

Previously, a private use statement would shadow a public use statement, all of
a sudden publicly exporting the privately used item. The correct behavior here
is to only shadow the use for the module in question, but for now it just
reverts the entire name to private so the pub use doesn't have much effect.

The behavior isn't exactly what we want, but this no longer has backwards
compatibility hazards.
src/librustc/middle/resolve.rs
src/libstd/io/test.rs
src/test/compile-fail/resolve-priv-shadowing-pub.rs [new file with mode: 0644]