Skip to content

Commit 9057e98

Browse files
committed
Make #[path] work with absolute paths again. Fix check-fast
1 parent 80a4769 commit 9057e98

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3045,7 +3045,14 @@ impl Parser {
30453045
Some(ref d) => mod_path.push(*d),
30463046
None => match ::attr::first_attr_value_str_by_name(
30473047
outer_attrs, ~"path") {
3048-
Some(ref d) => mod_path.push(*d),
3048+
Some(ref d) => {
3049+
let path = Path(*d);
3050+
if !path.is_absolute {
3051+
mod_path.push(*d)
3052+
} else {
3053+
path
3054+
}
3055+
}
30493056
None => mod_path.push(default_path)
30503057
}
30513058
};

0 commit comments

Comments
 (0)