Skip to content

Commit ff48def

Browse files
committed
---
yaml --- r: 129611 b: refs/heads/auto c: 0db6f4c h: refs/heads/master i: 129609: 34c13ec 129607: 9b3d49f v: v3
1 parent f7b063e commit ff48def

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: bcb07175ceca3e9a4b2644625bb510fa3f3d7368
16+
refs/heads/auto: 0db6f4cb57e6209dcd6e6d66732c190b652f6485
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-include ../tools.mk
2+
3+
# FIXME ignore windows
4+
ifndef IS_WINDOWS
5+
6+
source=index.rs
7+
8+
all:
9+
$(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc $(source)
10+
cp $(source) $(TMPDIR)
11+
cp verify.sh $(TMPDIR)
12+
$(call RUN,verify.sh) $(TMPDIR)
13+
14+
else
15+
all:
16+
17+
endif
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![crate_name = "rustdoc_test"]
12+
13+
// In: Foo
14+
pub use private::Foo;
15+
16+
mod private {
17+
pub struct Foo;
18+
impl Foo {
19+
// In: test_method
20+
pub fn test_method() {}
21+
// Out: priv_method
22+
fn priv_method() {}
23+
}
24+
25+
pub trait PrivateTrait {
26+
// Out: priv_method
27+
fn trait_method() {}
28+
}
29+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
source="$1/index.rs"
4+
index="$1/doc/search-index.js"
5+
6+
if ! [ -e $index ]
7+
then
8+
echo "Could not find the search index (looked for $index)"
9+
exit 1
10+
fi
11+
12+
ins=$(grep -o 'In: .*' $source | sed 's/In: \(.*\)/\1/g')
13+
outs=$(grep -o 'Out: .*' $source | sed 's/Out: \(.*\)/\1/g')
14+
15+
for p in $ins
16+
do
17+
if ! grep -q $p $index
18+
then
19+
echo "'$p' was erroneously excluded from search index."
20+
exit 1
21+
fi
22+
done
23+
24+
for p in $outs
25+
do
26+
if grep -q $p $index
27+
then
28+
echo "'$p' was erroneously included in search index."
29+
exit 1
30+
fi
31+
done
32+
33+
exit 0

0 commit comments

Comments
 (0)