summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-12-17 18:06:52 -0800
committerBrian Anderson <banderson@mozilla.com>2012-12-17 18:06:52 -0800
commit33a8f855c2c647079d69e0b2c83dd1737b539f70 (patch)
tree5c995e8bf86ed61c20c203bac5a5e6f096368019 /src/libsyntax/parse/parser.rs
parent5ff99c27d05322afffbee827d13a6a226430521c (diff)
downloadrust-33a8f855c2c647079d69e0b2c83dd1737b539f70.tar.gz
rust-33a8f855c2c647079d69e0b2c83dd1737b539f70.zip
Make the path and path2 attributes equivalent. Remove some uses
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 50ed0df28a0..d5aec079d16 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3018,7 +3018,7 @@ impl Parser {
     fn push_mod_path(id: ident, attrs: ~[ast::attribute]) {
         let default_path = self.sess.interner.get(id);
         let file_path = match ::attr::first_attr_value_str_by_name(
-            attrs, ~"path2") {
+            attrs, ~"path") {
 
             Some(ref d) => (*d),
             None => copy *default_path
@@ -3038,13 +3038,14 @@ impl Parser {
         let prefix = prefix.dir_path();
         let mod_path = Path(".").push_many(self.mod_path_stack);
         let default_path = self.sess.interner.get(id) + ~".rs";
+        // XXX path2 and path are synonyms. Remove path2 after snapshot
         let file_path = match ::attr::first_attr_value_str_by_name(
             outer_attrs, ~"path2") {
 
             Some(ref d) => mod_path.push(*d),
             None => match ::attr::first_attr_value_str_by_name(
                 outer_attrs, ~"path") {
-                Some(ref d) => Path(*d),
+                Some(ref d) => mod_path.push(*d),
                 None => mod_path.push(default_path)
             }
         };