Skip to content

Commit 32fbaae

Browse files
committed
---
yaml --- r: 60509 b: refs/heads/auto c: e3a91f6 h: refs/heads/master i: 60507: ca493fd v: v3
1 parent 5d84b62 commit 32fbaae

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: cac97d7ee565eef14b9e7385d1c088c1eb0a9295
17+
refs/heads/auto: e3a91f60c58d537945abc4c83b1b9f6ddcbe21fe
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,17 @@ fn encode_reexported_static_methods(ecx: @EncodeContext,
388388
match ecx.tcx.items.find(&exp.def_id.node) {
389389
Some(&ast_map::node_item(item, path)) => {
390390
let original_name = ecx.tcx.sess.str_of(item.ident);
391+
392+
//
393+
// We don't need to reexport static methods on traits
394+
// declared in the same module as our `pub use ...` since
395+
// that's done when we encode the trait item.
396+
//
397+
// The only exception is when the reexport *changes* the
398+
// name e.g. `pub use Foo = self::Bar` -- we have
399+
// encoded metadata for static methods relative to Bar,
400+
// but not yet for Foo.
401+
//
391402
if mod_path != *path || *exp.name != *original_name {
392403
for methods.each |&m| {
393404
if m.explicit_self == ast::sty_static {

0 commit comments

Comments
 (0)