about summary refs log tree commit diff
path: root/src/librustdoc/path_pass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/path_pass.rs')
-rw-r--r--src/librustdoc/path_pass.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/librustdoc/path_pass.rs b/src/librustdoc/path_pass.rs
index 55ce135f277..d26c3f8da6e 100644
--- a/src/librustdoc/path_pass.rs
+++ b/src/librustdoc/path_pass.rs
@@ -97,10 +97,11 @@ fn should_record_mod_paths() {
     do astsrv::from_str(source) |srv| {
         let doc = extract::from_srv(srv.clone(), ~"");
         let doc = run(srv.clone(), doc);
-        assert!(doc.cratemod().mods()[0].mods()[0].mods()[0].path()
-            == ~[~"a", ~"b"]);
-        assert!(doc.cratemod().mods()[0].mods()[1].mods()[0].path()
-            == ~[~"a", ~"d"]);
+        // hidden __std_macros module at the start.
+        assert_eq!(doc.cratemod().mods()[1].mods()[0].mods()[0].path(),
+                   ~[~"a", ~"b"]);
+        assert_eq!(doc.cratemod().mods()[1].mods()[1].mods()[0].path(),
+                   ~[~"a", ~"d"]);
     }
 }
 
@@ -110,6 +111,7 @@ fn should_record_fn_paths() {
     do astsrv::from_str(source) |srv| {
         let doc = extract::from_srv(srv.clone(), ~"");
         let doc = run(srv.clone(), doc);
-        assert_eq!(doc.cratemod().mods()[0].fns()[0].path(), ~[~"a"]);
+        // hidden __std_macros module at the start.
+        assert_eq!(doc.cratemod().mods()[1].fns()[0].path(), ~[~"a"]);
     }
 }