Skip to content

Commit 300eb30

Browse files
committed
Output native_name field for native mods when needed
1 parent e9b2487 commit 300eb30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/comp/syntax/print/pprust.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,11 @@ fn print_item(&ps s, &@ast::item item) {
448448
}
449449
word_nbsp(s, "mod");
450450
word_nbsp(s, item.ident);
451+
if !str::eq(nmod.native_name, item.ident) {
452+
word_space(s, "=");
453+
print_string(s, nmod.native_name);
454+
nbsp(s);
455+
}
451456
bopen(s);
452457
print_native_mod(s, nmod, item.attrs);
453458
bclose(s, item.span);

0 commit comments

Comments
 (0)