Explain an odd conditional check.
This commit is contained in:
parent
cac97d7ee5
commit
e3a91f60c5
@ -388,6 +388,17 @@ fn encode_reexported_static_methods(ecx: @EncodeContext,
|
||||
match ecx.tcx.items.find(&exp.def_id.node) {
|
||||
Some(&ast_map::node_item(item, path)) => {
|
||||
let original_name = ecx.tcx.sess.str_of(item.ident);
|
||||
|
||||
//
|
||||
// We don't need to reexport static methods on traits
|
||||
// declared in the same module as our `pub use ...` since
|
||||
// that's done when we encode the trait item.
|
||||
//
|
||||
// The only exception is when the reexport *changes* the
|
||||
// name e.g. `pub use Foo = self::Bar` -- we have
|
||||
// encoded metadata for static methods relative to Bar,
|
||||
// but not yet for Foo.
|
||||
//
|
||||
if mod_path != *path || *exp.name != *original_name {
|
||||
for methods.each |&m| {
|
||||
if m.explicit_self == ast::sty_static {
|
||||
|
Loading…
Reference in New Issue
Block a user