summary refs log tree commit diff
path: root/src/comp/driver
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-06-16 16:38:23 -0700
committerBrian Anderson <banderson@mozilla.com>2011-06-16 17:23:20 -0700
commitffa7c76ed2496309330f8e738d4cd5a1e8fb0c81 (patch)
tree5c096f7b09a0559b2a2c96e0bd3189974e9a387d /src/comp/driver
parente83a115d7987aead4d4ea33b0ca4dda6cd9aa0f0 (diff)
downloadrust-ffa7c76ed2496309330f8e738d4cd5a1e8fb0c81.tar.gz
rust-ffa7c76ed2496309330f8e738d4cd5a1e8fb0c81.zip
rustc: Change print_file to print_crate
The pretty-printer needs access to the crate attributes in order to reproduce
inner crate attributes in standalone .rs files

Issue #487
Diffstat (limited to 'src/comp/driver')
-rw-r--r--src/comp/driver/rustc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs
index a9e3748e1b5..8dfa6cb7b46 100644
--- a/src/comp/driver/rustc.rs
+++ b/src/comp/driver/rustc.rs
@@ -117,8 +117,8 @@ fn pretty_print_input(session::session sess, eval::env env, str input,
         case (ppm_normal) { mode = ppaux::mo_untyped; }
         case (ppm_identified) { mode = ppaux::mo_identified; }
     }
-    pprust::print_file(sess, crate.node.module, input, std::io::stdout(),
-                       mode);
+    pprust::print_crate(sess, crate, input, std::io::stdout(),
+                        mode);
 }
 
 fn version(str argv0) {