about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/parser.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index d5aec079d16..8622222e49b 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3045,7 +3045,14 @@ impl Parser {
             Some(ref d) => mod_path.push(*d),
             None => match ::attr::first_attr_value_str_by_name(
                 outer_attrs, ~"path") {
-                Some(ref d) => mod_path.push(*d),
+                Some(ref d) => {
+                    let path = Path(*d);
+                    if !path.is_absolute {
+                        mod_path.push(*d)
+                    } else {
+                        path
+                    }
+                }
                 None => mod_path.push(default_path)
             }
         };