about summary refs log tree commit diff
path: root/src/comp/front
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-01-12 17:59:49 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-01-12 18:04:02 +0100
commitefb9df1ebd7ebe0232e202d0e065b08d6a593785 (patch)
treec0e798a4f2529fb5cdb6512555676ba2bae0c5b6 /src/comp/front
parent56fe4c2681f7ef467d8b3405279acbcfc6b0ebcf (diff)
downloadrust-efb9df1ebd7ebe0232e202d0e065b08d6a593785.tar.gz
rust-efb9df1ebd7ebe0232e202d0e065b08d6a593785.zip
Make driver::session::session no longer an object
Rather, it is now a struct where properties like opts are accessed
directly, and the error-reporting methods are part of a static impl
(with the same name as the type).
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/attr.rs4
-rw-r--r--src/comp/front/test.rs3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/comp/front/attr.rs b/src/comp/front/attr.rs
index 5ae398e238c..120b0e412cd 100644
--- a/src/comp/front/attr.rs
+++ b/src/comp/front/attr.rs
@@ -3,7 +3,7 @@
 import core::{either, vec, option};
 import std::map;
 import syntax::{ast, ast_util};
-import driver::session;
+import driver::session::session;
 
 export attr_meta;
 export attr_metas;
@@ -189,7 +189,7 @@ fn remove_meta_items_by_name(items: [@ast::meta_item], name: str) ->
     ret vec::filter_map(items, filter);
 }
 
-fn require_unique_names(sess: session::session, metas: [@ast::meta_item]) {
+fn require_unique_names(sess: session, metas: [@ast::meta_item]) {
     let map = map::new_str_hash();
     for meta: @ast::meta_item in metas {
         let name = get_meta_item_name(meta);
diff --git a/src/comp/front/test.rs b/src/comp/front/test.rs
index 79d4523b14b..be9554d7c68 100644
--- a/src/comp/front/test.rs
+++ b/src/comp/front/test.rs
@@ -8,6 +8,7 @@ import syntax::fold;
 import syntax::print::pprust;
 import syntax::codemap::span;
 import driver::session;
+import session::session;
 import front::attr;
 
 export modify_for_testing;
@@ -27,7 +28,7 @@ type test_ctxt =
 fn modify_for_testing(sess: session::session,
                       crate: @ast::crate) -> @ast::crate {
 
-    if sess.get_opts().test {
+    if sess.opts.test {
         generate_test_harness(sess, crate)
     } else {
         strip_test_functions(crate)