File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
branches/try2/src/librustdoc/html Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 34ece7ad718469b4634d5eadd91d078d95bbd6c5
8
+ refs/heads/try2: 85299e360cda49d61b8d9a509319e19bc206c336
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -262,10 +262,11 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
262
262
cache. stack . push ( krate. name . clone ( ) ) ;
263
263
krate = cache. fold_crate ( krate) ;
264
264
{
265
+ let Cache { search_index : ref mut index,
266
+ orphan_methods : ref meths, paths : ref mut paths, ..} = cache;
267
+
265
268
// Attach all orphan methods to the type's definition if the type
266
269
// has since been learned.
267
- let Cache { search_index : ref mut index,
268
- orphan_methods : ref meths, paths : ref paths, ..} = cache;
269
270
for & ( ref pid, ref item) in meths. iter ( ) {
270
271
match paths. find ( pid) {
271
272
Some ( & ( ref fqp, _) ) => {
@@ -280,6 +281,18 @@ pub fn run(mut krate: clean::Crate, dst: Path) -> io::IoResult<()> {
280
281
None => { }
281
282
}
282
283
} ;
284
+
285
+ // Prune the paths that do not appear in the index.
286
+ let mut unseen: HashSet < ast:: NodeId > = paths. keys ( ) . map ( |& id| id) . collect ( ) ;
287
+ for item in index. iter ( ) {
288
+ match item. parent {
289
+ Some ( ref pid) => { unseen. remove ( pid) ; }
290
+ None => { }
291
+ }
292
+ }
293
+ for pid in unseen. iter ( ) {
294
+ paths. remove ( pid) ;
295
+ }
283
296
}
284
297
285
298
// Publish the search index
You can’t perform that action at this time.
0 commit comments