Remove transitional path2 attribute

This commit is contained in:
Brian Anderson 2012-12-19 14:17:53 -08:00
parent 78dc226617
commit dac88fa7e6
3 changed files with 12 additions and 18 deletions

View File

@ -104,7 +104,7 @@ mod middle {
mod ty;
#[legacy_exports]
mod resolve;
#[path2 = "typeck/mod.rs"]
#[path = "typeck/mod.rs"]
pub mod typeck;
#[legacy_exports]
mod check_loop;
@ -114,7 +114,7 @@ mod middle {
mod check_const;
#[legacy_exports]
mod lint;
#[path2 = "borrowck/mod.rs"]
#[path = "borrowck/mod.rs"]
pub mod borrowck;
#[legacy_exports]
mod mem_categorization;

View File

@ -3038,23 +3038,17 @@ 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) => {
let path = Path(*d);
if !path.is_absolute {
mod_path.push(*d)
} else {
path
}
outer_attrs, ~"path") {
Some(ref d) => {
let path = Path(*d);
if !path.is_absolute {
mod_path.push(*d)
} else {
path
}
None => mod_path.push(default_path)
}
None => mod_path.push(default_path)
};
self.eval_src_mod_from_path(prefix, file_path,

View File

@ -55,7 +55,7 @@ mod fold;
mod util {
#[legacy_exports];
#[legacy_exports]
#[path2 = "interner.rs"]
#[path = "interner.rs"]
mod interner;
}
@ -110,7 +110,7 @@ mod ext {
mod source_util;
#[legacy_exports]
#[path2 = "pipes/mod.rs"]
#[path = "pipes/mod.rs"]
mod pipes;
#[legacy_exports]