Skip to content

Commit 8e9ca3c

Browse files
committed
---
yaml --- r: 65087 b: refs/heads/master c: e3a91f6 h: refs/heads/master i: 65085: fa5a5a2 65083: e2c9bc3 65079: af0e085 65071: dc90a44 65055: 6f31798 65023: 544643f v: v3
1 parent 6a9ab24 commit 8e9ca3c

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cac97d7ee565eef14b9e7385d1c088c1eb0a9295
2+
refs/heads/master: e3a91f60c58d537945abc4c83b1b9f6ddcbe21fe
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/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)