about summary refs log tree commit diff
path: root/src/libstd/getopts.rs
AgeCommit message (Collapse)AuthorLines
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-1381/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-4/+4
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-36/+36
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-4/+4
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-10renamed str::from_slice to str::to_ownedYoungsoo Son-22/+22
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-1/+1
2013-05-09auto merge of #6349 : thestinger/rust/explicit_copy, r=thestingerbors-33/+38
I removed some of the copies, but most are just made explicit. The usage in `libcore` was already fixed, but the attribute was only set to warn (not removed).
2013-05-09remove vecs_implicitly_copyable from libstd/libcoreDaniel Micay-33/+38
2013-05-09auto merge of #6345 : seanmoon/rust/fix-typos, r=sanxiynbors-1/+1
Hi there, Really enjoying Rust. Noticed a few typos so I searched around for a few more--here's some fixes. Ran `make check` and got `summary of 24 test runs: 4868 passed; 0 failed; 330 ignored`. Thanks! Sean
2013-05-09libstd: rename vec::each(var) to var.eachYoungmin Yoo-2/+2
2013-05-09Fix typosSean Moon-1/+1
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-8/+0
2013-04-27only use #[no_core] in libcoreDaniel Micay-3/+0
2013-04-16libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵Huon Wilson-52/+52
pub mod or pub fn).
2013-04-14std: remove unused unsafe blocks/functionsAlex Crichton-110/+108
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-80/+80
2013-03-28Removing unused importsAlex Crichton-1/+1
2013-03-26Switched over a bunch of splitting funktions to non-allocating iteratorsMarvin Löbel-6/+7
2013-03-26pre-rebase commitMarvin Löbel-2/+17
2013-03-22std: replace uses of old deriving attribute with new oneAndrew Paseltiner-9/+9
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-2/+2
slice_unique
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-2/+2
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-13auto merge of #5293 : brson/rust/logging, r=brsonbors-1/+1
r? @graydon This removes `log` from the language. Because we can't quite implement it as a syntax extension (probably need globals at the least) it simply renames the keyword to `__log` and hides it behind macros. After this the only way to log is with `debug!`, `info!`, etc. I figure that if there is demand for `log!` we can add it back later. I am not sure that we ever agreed on this course of action, though I *think* there is consensus that `log` shouldn't be a statement.
2013-03-12auto merge of #5329 : wanderview/rust/std-getopts-opts_present, r=graydonbors-4/+5
Currently the opts_present() function only checks to see if the option is configured in the match, but doesn't actually check to see if the option value has been set. This means that opt_present('h') may return false while opts_present([~'h']) returns true. Add a test case to catch this condition and fix opts_present() to check the value before returning true. Note, there is another API difference between these two functions that this does not address. Currently if you pass a non-configured option to opt_present() the program will fail!(), but opts_present() simply returns false. If it is acceptable to standardize on the fail!() then opts_present() should probably be implemented in terms of the opt_present() function.
2013-03-11Remove uses of logBrian Anderson-1/+1
2013-03-11Fix std::getopts::opts_present() to check value.Ben Kelly-4/+5
Currently the opts_present() function only checks to see if the option is configured in the match, but doesn't actually check to see if the option value has been set. This means that opt_present('h') may return false while opts_present([~'h']) returns true. Add a test case to catch this condition and fix opts_present() to check the value before returning true. Note, there is another API difference between these two functions that this does not address. Currently if you pass a non-configured option to opt_present() the program will fail!(), but opts_present() simply returns false. If it is acceptable to standardize on the fail!() then opts_present() should probably be implemented in terms of the opt_present() function.
2013-03-10Correct copyright year to be 2012-2013.Ben Kelly-1/+1
Previous year range of 2011-2013 was based on file creation date. The check_license python script, however, only accepts copyrights starting in 2012 or later.
2013-03-10Fix formatting and errors in std::getopts example.Ben Kelly-5/+8
There were three issues effecting the example in the getopts rustdoc: 1. The blockquote was incorrectly formatted. Fixed by switching to using an explicit markdown code section with ```. 2. The `fail fail_str(f)` would not compile. Fixed by using `fail!()` instead of `fail`. 3. The line `matches.free[0]` produced a compile error about moving from an immutable vector. Fix by using `copy`.
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-85/+85
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-1/+0
2013-03-04Remove unused imports throughout src/Alex Crichton-1/+0
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-1/+1
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-15libstd: Get rid of `move`.Luqman Aden-4/+4
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-48/+48
2013-02-13RIMOV core::vecBen Striegel-2/+2
Also remove as many uses as possible of vec::cast_to_mut and cast_from_mut
2013-02-08Remove trailing whitespaceMatthew McPherrin-5/+5
2013-02-08Merge branch 'master' of https://github.com/mozilla/rustMatthew McPherrin-1/+0
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-1/+0
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-06Fix sample program to compile in modern rustMatthew McPherrin-42/+44
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-49/+49
2013-01-29De-capitalize "note" to get rid of spurious tidy warningsTim Chevalier-1/+1
2013-01-29libstd: De-export libstd. rs=deexportPatrick Walton-53/+52
2013-01-24replace ConstVector trait with the Container traitDaniel Micay-3/+3
2013-01-23libsyntax: Remove `fn() unsafe { ... }`. r=graydonPatrick Walton-108/+110
2013-01-23core: Rename to_mut and from_mut to cast_to_mut and cast_from_mutTrinick-2/+2
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-6/+11
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-11/+6
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-6/+11
module scope. r=tjc
2012-12-27libstd: Fix a bunch of resolve errors in tests. rs=firePatrick Walton-1/+4
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-0/+7
contain at least two components. r=graydon