Skip to content

Commit 1cf0a06

Browse files
committed
---
yaml --- r: 40493 b: refs/heads/dist-snap c: 145e023 h: refs/heads/master i: 40491: 3a65c5e v: v3
1 parent d3cd74c commit 1cf0a06

26 files changed

+103
-214
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: a27f5239bdeb48055b40ccf3c3cd176e1971b2ac
10+
refs/heads/dist-snap: 145e02347e88176e342631033abb748c51db45e8
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustdoc/astsrv.rs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,29 @@ use rustc::back::link;
2121
use rustc::metadata::filesearch;
2222
use rustc::front;
2323

24-
export Ctxt;
25-
export CtxtHandler;
26-
export Srv;
27-
export from_str;
28-
export from_file;
29-
export exec;
30-
31-
type Ctxt = {
24+
pub type Ctxt = {
3225
ast: @ast::crate,
3326
ast_map: ast_map::map
3427
};
3528

3629
type SrvOwner<T> = fn(srv: Srv) -> T;
37-
type CtxtHandler<T> = fn~(ctxt: Ctxt) -> T;
30+
pub type CtxtHandler<T> = fn~(ctxt: Ctxt) -> T;
3831
type Parser = fn~(Session, ~str) -> @ast::crate;
3932

4033
enum Msg {
4134
HandleRequest(fn~(Ctxt)),
4235
Exit
4336
}
4437

45-
enum Srv = {
38+
pub enum Srv = {
4639
ch: comm::Chan<Msg>
4740
};
4841

49-
fn from_str<T>(source: ~str, owner: SrvOwner<T>) -> T {
42+
pub fn from_str<T>(source: ~str, owner: SrvOwner<T>) -> T {
5043
run(owner, source, parse::from_str_sess)
5144
}
5245

53-
fn from_file<T>(file: ~str, owner: SrvOwner<T>) -> T {
46+
pub fn from_file<T>(file: ~str, owner: SrvOwner<T>) -> T {
5447
run(owner, file, |sess, f| parse::from_file_sess(sess, &Path(f)))
5548
}
5649

@@ -88,7 +81,7 @@ fn act(po: comm::Port<Msg>, source: ~str, parse: Parser) {
8881
}
8982
}
9083

91-
fn exec<T:Send>(
84+
pub fn exec<T:Send>(
9285
srv: Srv,
9386
+f: fn~(ctxt: Ctxt) -> T
9487
) -> T {

branches/dist-snap/src/librustdoc/attr_parser.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ use syntax::ast;
99
use syntax::attr;
1010
use core::tuple;
1111

12-
export CrateAttrs;
13-
export parse_crate, parse_desc;
14-
export parse_hidden;
15-
16-
type CrateAttrs = {
12+
pub type CrateAttrs = {
1713
name: Option<~str>
1814
};
1915

@@ -48,7 +44,7 @@ fn doc_metas(
4844
return doc_metas;
4945
}
5046

51-
fn parse_crate(attrs: ~[ast::attribute]) -> CrateAttrs {
47+
pub fn parse_crate(attrs: ~[ast::attribute]) -> CrateAttrs {
5248
let link_metas = attr::find_linkage_metas(attrs);
5349

5450
{
@@ -80,7 +76,7 @@ fn should_not_extract_crate_name_if_no_name_value_in_link_attribute() {
8076
assert attrs.name == None;
8177
}
8278

83-
fn parse_desc(attrs: ~[ast::attribute]) -> Option<~str> {
79+
pub fn parse_desc(attrs: ~[ast::attribute]) -> Option<~str> {
8480
let doc_strs = do doc_metas(attrs).filter_map |meta| {
8581
attr::get_meta_item_value_str(*meta)
8682
};
@@ -107,7 +103,7 @@ fn parse_desc_should_parse_simple_doc_attributes() {
107103
assert attrs == Some(~"basic");
108104
}
109105

110-
fn parse_hidden(attrs: ~[ast::attribute]) -> bool {
106+
pub fn parse_hidden(attrs: ~[ast::attribute]) -> bool {
111107
do doc_metas(attrs).find |meta| {
112108
match attr::get_meta_item_list(meta) {
113109
Some(metas) => {

branches/dist-snap/src/librustdoc/attr_pass.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ use syntax::ast;
1212
use syntax::ast_map;
1313
use std::map::HashMap;
1414

15-
export mk_pass;
16-
17-
fn mk_pass() -> Pass {
15+
pub fn mk_pass() -> Pass {
1816
{
1917
name: ~"attr",
2018
f: run

branches/dist-snap/src/librustdoc/config.rs

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
use result::Result;
22
use std::getopts;
33

4-
export OutputFormat;
5-
export OutputStyle;
6-
export Config;
7-
export default_config;
8-
export parse_config;
9-
export usage;
10-
export Markdown, PandocHtml;
11-
export DocPerCrate, DocPerMod;
12-
134
/// The type of document to output
14-
enum OutputFormat {
5+
pub enum OutputFormat {
156
/// Markdown
16-
Markdown,
7+
pub Markdown,
178
/// HTML, via markdown and pandoc
18-
PandocHtml
9+
pub PandocHtml
1910
}
2011

2112
impl OutputFormat : cmp::Eq {
@@ -36,11 +27,11 @@ impl OutputFormat : cmp::Eq {
3627
}
3728

3829
/// How to organize the output
39-
enum OutputStyle {
30+
pub enum OutputStyle {
4031
/// All in a single document
41-
DocPerCrate,
32+
pub DocPerCrate,
4233
/// Each module in its own document
43-
DocPerMod
34+
pub DocPerMod
4435
}
4536

4637
impl OutputStyle : cmp::Eq {
@@ -61,7 +52,7 @@ impl OutputStyle : cmp::Eq {
6152
}
6253

6354
/// The configuration for a rustdoc session
64-
type Config = {
55+
pub type Config = {
6556
input_crate: Path,
6657
output_dir: Path,
6758
output_format: OutputFormat,
@@ -90,7 +81,7 @@ fn opts() -> ~[(getopts::Opt, ~str)] {
9081
]
9182
}
9283

93-
fn usage() {
84+
pub fn usage() {
9485
use io::println;
9586

9687
println(~"Usage: rustdoc [options] <cratefile>\n");
@@ -101,7 +92,7 @@ fn usage() {
10192
println(~"");
10293
}
10394

104-
fn default_config(input_crate: &Path) -> Config {
95+
pub fn default_config(input_crate: &Path) -> Config {
10596
{
10697
input_crate: *input_crate,
10798
output_dir: Path("."),

branches/dist-snap/src/librustdoc/desc_to_brief_pass.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ is interpreted as the brief description.
77

88
use doc::ItemUtils;
99

10-
export mk_pass;
11-
12-
fn mk_pass() -> Pass {
10+
pub fn mk_pass() -> Pass {
1311
{
1412
name: ~"desc_to_brief",
1513
f: run

0 commit comments

Comments
 (0)