Skip to content

Commit c941513

Browse files
committed
---
yaml --- r: 108015 b: refs/heads/dist-snap c: 9752c63 h: refs/heads/master i: 108013: 598a607 108011: e958f38 108007: 904bb4a 107999: 1e3df7a v: v3
1 parent 38f76d0 commit c941513

File tree

15 files changed

+46
-37
lines changed

15 files changed

+46
-37
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 66b9c35654d1e7716ab5ef6236c6cf308818e71c
9+
refs/heads/dist-snap: 9752c63035bc78f624c5fa1ca644f15db4e2a0df
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/crates.mk

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,20 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := std extra green rustuv native flate arena glob term semver uuid serialize sync
52+
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53+
uuid serialize sync getopts
5354
HOST_CRATES := syntax rustc rustdoc
5455
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5556
TOOLS := compiletest rustdoc rustc
5657

5758
DEPS_std := native:rustrt
58-
DEPS_extra := std serialize sync term
59+
DEPS_extra := std term sync serialize getopts
5960
DEPS_green := std
6061
DEPS_rustuv := std native:uv native:uv_support
6162
DEPS_native := std
6263
DEPS_syntax := std extra term serialize
63-
DEPS_rustc := syntax native:rustllvm flate arena serialize sync
64-
DEPS_rustdoc := rustc native:sundown serialize sync
64+
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts
65+
DEPS_rustdoc := rustc native:sundown serialize sync getopts
6566
DEPS_flate := std native:miniz
6667
DEPS_arena := std extra
6768
DEPS_glob := std
@@ -70,8 +71,9 @@ DEPS_term := std
7071
DEPS_semver := std
7172
DEPS_uuid := std serialize
7273
DEPS_sync := std
74+
DEPS_getopts := std
7375

74-
TOOL_DEPS_compiletest := extra green rustuv
76+
TOOL_DEPS_compiletest := extra green rustuv getopts
7577
TOOL_DEPS_rustdoc := rustdoc green rustuv
7678
TOOL_DEPS_rustc := rustc green rustuv
7779
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs

branches/dist-snap/src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
#[deny(warnings)];
1515

1616
extern mod extra;
17+
extern mod getopts;
1718

1819
use std::os;
1920
use std::io;
2021
use std::io::fs;
2122

22-
use extra::getopts;
23-
use extra::getopts::groups::{optopt, optflag, reqopt};
23+
use getopts::groups::{optopt, optflag, reqopt};
2424
use extra::test;
2525

2626
use common::config;

branches/dist-snap/src/doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ li {list-style-type: none; }
3939

4040
* [The `arena` allocation library](arena/index.html)
4141
* [The `flate` compression library](flate/index.html)
42+
* [The `getopts` argument parsing library](getopts/index.html)
4243
* [The `glob` file path matching library](glob/index.html)
4344
* [The `semver` version collation library](semver/index.html)
4445
* [The `serialize` value encoding/decoding library](serialize/index.html)

branches/dist-snap/src/libextra/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ pub mod lru_cache;
7373
// And ... other stuff
7474

7575
pub mod url;
76-
pub mod getopts;
7776
pub mod json;
7877
pub mod tempfile;
7978
pub mod time;

branches/dist-snap/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
extern mod term;
1919

20-
use getopts;
2120
use getopts::groups;
21+
use getopts;
2222
use json::ToJson;
2323
use json;
2424
use serialize::Decodable;

branches/dist-snap/src/libextra/getopts.rs renamed to branches/dist-snap/src/libgetopts/lib.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
//! file name following `-o`, and accepts both `-h` and `--help` as optional flags.
3131
//!
3232
//! ~~~{.rust}
33-
//! extern mod extra;
34-
//! use extra::getopts::{optopt,optflag,getopts,Opt};
33+
//! extern mod getopts;
34+
//! use getopts::{optopt,optflag,getopts,Opt};
3535
//! use std::os;
3636
//!
3737
//! fn do_work(inp: &str, out: Option<~str>) {
@@ -77,6 +77,14 @@
7777
//! }
7878
//! ~~~
7979
80+
#[crate_id = "getopts#0.10-pre"];
81+
#[crate_type = "rlib"];
82+
#[crate_type = "dylib"];
83+
#[license = "MIT/ASL2"];
84+
#[allow(missing_doc)];
85+
86+
#[feature(globs)];
87+
8088
use std::cmp::Eq;
8189
use std::result::{Err, Ok};
8290
use std::result;
@@ -519,8 +527,8 @@ pub fn getopts(args: &[~str], opts: &[Opt]) -> Result {
519527
/// A module which provides a way to specify descriptions and
520528
/// groups of short and long option names, together.
521529
pub mod groups {
522-
use getopts::{HasArg, Long, Maybe, Multi, No, Occur, Opt, Optional, Req};
523-
use getopts::{Short, Yes};
530+
use super::{HasArg, Long, Maybe, Multi, No, Occur, Opt, Optional, Req};
531+
use super::{Short, Yes};
524532
525533
/// One group of options, e.g., both -h and --help, along with
526534
/// their shared description and properties.
@@ -671,8 +679,8 @@ pub mod groups {
671679
}
672680

673681
/// Parse command line args with the provided long format options.
674-
pub fn getopts(args: &[~str], opts: &[OptGroup]) -> ::getopts::Result {
675-
::getopts::getopts(args, opts.map(|x| x.long_to_short()))
682+
pub fn getopts(args: &[~str], opts: &[OptGroup]) -> super::Result {
683+
super::getopts(args, opts.map(|x| x.long_to_short()))
676684
}
677685

678686
fn format_option(opt: &OptGroup) -> ~str {
@@ -901,8 +909,8 @@ pub mod groups {
901909
#[cfg(test)]
902910
mod tests {
903911

904-
use getopts::groups::OptGroup;
905-
use getopts::*;
912+
use super::groups::OptGroup;
913+
use super::*;
906914

907915
use std::result::{Err, Ok};
908916
use std::result;

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ use std::io::fs;
3434
use std::io::MemReader;
3535
use std::os;
3636
use std::vec;
37-
use extra::getopts::groups::{optopt, optmulti, optflag, optflagopt};
38-
use extra::getopts;
37+
use getopts::groups::{optopt, optmulti, optflag, optflagopt};
38+
use getopts;
3939
use syntax::ast;
4040
use syntax::abi;
4141
use syntax::attr;
@@ -1188,7 +1188,7 @@ mod test {
11881188
use driver::driver::{build_configuration, build_session};
11891189
use driver::driver::{build_session_options, optgroups};
11901190

1191-
use extra::getopts::groups::getopts;
1191+
use getopts::groups::getopts;
11921192
use syntax::attr;
11931193
use syntax::attr::AttrMetaMethods;
11941194
use syntax::diagnostic;

branches/dist-snap/src/librustc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ extern mod arena;
3737
extern mod syntax;
3838
extern mod serialize;
3939
extern mod sync;
40+
extern mod getopts;
4041

4142
use back::link;
4243
use driver::session;
@@ -50,8 +51,7 @@ use std::os;
5051
use std::str;
5152
use std::task;
5253
use std::vec;
53-
use extra::getopts::groups;
54-
use extra::getopts;
54+
use getopts::groups;
5555
use syntax::ast;
5656
use syntax::attr;
5757
use syntax::diagnostic::Emitter;

branches/dist-snap/src/librustc/middle/typeck/infer/test.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ use middle::lang_items::{LanguageItems, language_items};
2323
use middle::ty::{FnTyBase, FnMeta, FnSig};
2424
use util::ppaux::ty_to_str;
2525

26-
use extra::getopts::groups::{optopt, optmulti, optflag, optflagopt, getopts};
27-
use extra::getopts::groups;
28-
use extra::getopts::{opt_present};
29-
use extra::getopts;
30-
use extra::getopts;
3126
use extra::oldmap::HashMap;
27+
use getopts::groups::{optopt, optmulti, optflag, optflagopt, getopts};
28+
use getopts::groups;
29+
use getopts::opt_present;
3230
use syntax::codemap::DUMMY_SP;
3331
use syntax::parse::parse_crate_from_source_str;
3432
use syntax::{ast, attr, parse};

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ extern mod rustc;
2020
extern mod extra;
2121
extern mod serialize;
2222
extern mod sync;
23+
extern mod getopts;
2324

2425
use std::local_data;
2526
use std::io;
2627
use std::io::{File, MemWriter};
2728
use std::str;
28-
use extra::getopts;
29-
use extra::getopts::groups;
3029
use extra::json;
3130
use serialize::{Decodable, Encodable};
3231
use extra::time;
32+
use getopts::groups;
3333

3434
pub mod clean;
3535
pub mod core;
@@ -81,7 +81,7 @@ pub fn main() {
8181
}
8282

8383
pub fn opts() -> ~[groups::OptGroup] {
84-
use extra::getopts::groups::*;
84+
use getopts::groups::*;
8585
~[
8686
optflag("h", "help", "show this help message"),
8787
optflag("", "version", "print rustdoc's version"),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ use std::run;
1616
use std::str;
1717

1818
use extra::tempfile::TempDir;
19-
use extra::getopts;
2019
use extra::test;
2120
use rustc::driver::driver;
2221
use rustc::driver::session;
2322
use rustc::metadata::creader::Loader;
23+
use getopts;
2424
use syntax::diagnostic;
2525
use syntax::parse;
2626

branches/dist-snap/src/libsyntax/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,8 @@ pub struct ViewItem {
10641064
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
10651065
pub enum ViewItem_ {
10661066
// ident: name used to refer to this crate in the code
1067-
// optional (InternedString,StrStyle): if present, this is a location
1068-
// (containing arbitrary characters) from which to fetch the crate sources
1067+
// optional @str: if present, this is a location (containing
1068+
// arbitrary characters) from which to fetch the crate sources
10691069
// For example, extern mod whatever = "github.com/mozilla/rust"
10701070
ViewItemExternMod(Ident, Option<(InternedString,StrStyle)>, NodeId),
10711071
ViewItemUse(~[@ViewPath]),

branches/dist-snap/src/test/bench/shootout-pfib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
*/
2020

2121
extern mod extra;
22+
extern mod getopts;
2223

23-
use extra::{time, getopts};
24+
use extra::time;
2425
use std::os;
2526
use std::result::{Ok, Err};
2627
use std::task;

branches/dist-snap/src/test/run-pass/getopts_ref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// option. This file may not be copied, modified, or distributed
1111
// except according to those terms.
1212

13-
extern mod extra;
13+
extern mod getopts;
1414

15-
use extra::getopts::{optopt, getopts};
15+
use getopts::{optopt, getopts};
1616

1717
pub fn main() {
1818
let args = ~[];

0 commit comments

Comments
 (0)