about summary refs log tree commit diff
path: root/src/libgetopts
AgeCommit message (Collapse)AuthorLines
2014-06-06rustdoc: Submit examples to play.rust-lang.orgAlex Crichton-1/+2
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
2014-06-06Change to_str().to_string() to just to_str()Adolfo OchagavĂ­a-1/+1
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-10/+10
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-9/+8
This was only ever a transitionary macro.
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-0/+1
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27std: Rename strbuf operations to stringRicho Healey-154/+154
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-26std: Remove String::from_owned_str as it's redundantRicho Healey-1/+1
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-35/+35
[breaking-change]
2014-05-22auto merge of #14357 : huonw/rust/spelling, r=pnkfelixbors-1/+1
The span on a inner doc-comment would point to the next token, e.g. the span for the `a` line points to the `b` line, and the span of `b` points to the `fn`. ```rust //! a //! b fn bar() {} ```
2014-05-22auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonwbors-1/+1
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-4/+8
2014-05-22Spelling/doc formatting fixes.Huon Wilson-1/+1
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-1/+1
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.
2014-05-16libgetopts: Remove all uses of `~str` from `libgetopts`Patrick Walton-204/+227
2014-05-12Add the patch number to version strings. Closes #13289Brian Anderson-1/+1
2014-05-08Handle fallout in documentationKevin Ballard-1/+1
Tweak the tutorial's section on vectors and strings, to slightly clarify the difference between fixed-size vectors, vectors, and slices.
2014-05-01remove leftover obsolete string literalsDaniel Micay-6/+6
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-95/+102
2014-04-10auto merge of #13440 : huonw/rust/strbuf, r=alexcrichtonbors-10/+12
libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269
2014-04-10Remove some internal ~[] from several libraries.Huon Wilson-1/+1
Some straggling instances of `~[]` across a few different libs. Also, remove some public ones from workcache.
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-10/+12
port all code over to use it.
2014-04-04Register new snapshotsAlex Crichton-2/+0
2014-04-03Bump version to 0.11-preBrian Anderson-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03auto merge of #13286 : alexcrichton/rust/release, r=brsonbors-1/+1
Merging the 0.10 release into the master branch.
2014-03-31getopts: Switch field privacy as necessaryAlex Crichton-13/+16
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-10/+10
Closes #2569
2014-03-22getopts: remove all uses of `~[]`.Huon Wilson-11/+11
And stop regressions with the lint.
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-1/+0
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-184/+189
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20Register new snapshotsAlex Crichton-2/+2
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec -> std::sliceDaniel Micay-2/+2
Closes #12702
2014-03-18deny missing docsAlan Andrade-1/+1
2014-03-16getopts missing docsAlan Andrade-4/+15
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-1/+3
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-15Add rustdoc html crate infoSteven Fackler-0/+3
2014-03-14lint: add lint for use of a `~[T]`.Huon Wilson-0/+1
This is useless at the moment (since pretty much every crate uses `~[]`), but should help avoid regressions once completely removed from a crate.
2014-03-06debuginfo: Expose limited debuginfo in command line optionsMichael Woerister-0/+19
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-1/+1
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-02-23Remove all ToStr impls, add Show implsAlex Crichton-1/+1
This commit changes the ToStr trait to: impl<T: fmt::Show> ToStr for T { fn to_str(&self) -> ~str { format!("{}", *self) } } The ToStr trait has been on the chopping block for quite awhile now, and this is the final nail in its coffin. The trait and the corresponding method are not being removed as part of this commit, but rather any implementations of the `ToStr` trait are being forbidden because of the generic impl. The new way to get the `to_str()` method to work is to implement `fmt::Show`. Formatting into a `&mut Writer` (as `format!` does) is much more efficient than `ToStr` when building up large strings. The `ToStr` trait forces many intermediate allocations to be made while the `fmt::Show` trait allows incremental buildup in the same heap allocated buffer. Additionally, the `fmt::Show` trait is much more extensible in terms of interoperation with other `Writer` instances and in more situations. By design the `ToStr` trait requires at least one allocation whereas the `fmt::Show` trait does not require any allocations. Closes #8242 Closes #9806
2014-02-14extern mod => extern crateAlex Crichton-1/+1
This was previously implemented, and it just needed a snapshot to go through
2014-02-11libgetopts -- fix unsafe sharing in closuresNiko Matsakis-13/+37
2014-02-06getopts: fixed a failing testArcterus-6/+5
2014-02-06getopts: unify testsArcterus-362/+148
2014-02-06getopts: replaced base functions with those from groupArcterus-473/+435
2014-02-06Move getopts out of extraArcterus-0/+1712