From 300eb3011355d81f95b79de4ca85e6190f1935a4 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 27 Jul 2011 14:02:26 +0200 Subject: [PATCH] Output native_name field for native mods when needed --- src/comp/syntax/print/pprust.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 0a83f826c499..92a1283cf16d 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -448,6 +448,11 @@ fn print_item(&ps s, &@ast::item item) { } word_nbsp(s, "mod"); word_nbsp(s, item.ident); + if !str::eq(nmod.native_name, item.ident) { + word_space(s, "="); + print_string(s, nmod.native_name); + nbsp(s); + } bopen(s); print_native_mod(s, nmod, item.attrs); bclose(s, item.span);