about summary refs log tree commit diff
path: root/src/libextra
AgeCommit message (Collapse)AuthorLines
2013-10-16auto merge of #9833 : alexcrichton/rust/fixes, r=brsonbors-1/+23
Commits have all the fun details
2013-10-16auto merge of #9655 : kballard/rust/path-rewrite, r=alexcrichtonbors-73/+100
Rewrite the entire `std::path` module from scratch. `PosixPath` is now based on `~[u8]`, which fixes #7225. Unnecessary allocation has been eliminated. There are a lot of clients of `Path` that still assume utf-8 paths. This is covered in #9639.
2013-10-16path2: Update for latest masterKevin Ballard-3/+3
Also fix some issues that crept into earlier commits during the conflict resoution for the rebase.
2013-10-16path2: Update based on more review feedbackKevin Ballard-17/+4
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15Require module documentation with missing_docAlex Crichton-1/+23
Closes #9824
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-26/+26
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Update for loop -> continueKevin Ballard-1/+1
2013-10-15path2: Replace the path module outrightKevin Ballard-64/+104
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-15Remove extra::flatpipesSteven Fackler-980/+0
Closes #9884
2013-10-14Only use padded test names to calculate the target padding size.Felix S. Klock II-3/+12
2013-10-14Issue 7655: align the bench printouts so that the numbers tend to be aligned.Felix S. Klock II-12/+51
(scratching an itch.) Rebased and updated. Fixed bug: omitted field init from embedded struct literal in a test. Fixed bug: int underflow during padding length calculation.
2013-10-14Removing ccdeclSteve Klabnik-2/+2
as per https://github.com/mozilla/rust/pull/9606#discussion_r6930872
2013-10-14Remove unused abi attributes.Steve Klabnik-4/+2
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
2013-10-14extra: implement Encodable/Decodable for UuidCorey Richardson-0/+15
2013-10-11auto merge of #9794 : thestinger/rust/rc, r=alexcrichtonbors-376/+0
I've left out a way to construct from a `Send` type until #9509 is resolved. I am confident that this interface can remain backwards compatible though, assuming we name the `Pointer` trait method `borrow`. When there is a way to convert from `Send` (`from_send`), a future RAII-based `Mut` type can be used with this to implemented a mutable reference-counted pointer. For now, I've left around the `RcMut` type but it may drastically change or be removed.
2013-10-11clean up the `Rc`/`RcMut` types and move to libstdDaniel Micay-376/+0
2013-10-11auto merge of #9803 : alexcrichton/rust/less-pub2, r=brsonbors-1/+1
This change was waiting for privacy to get sorted out, which should be true now that #8215 has landed. Closes #4427
2013-10-11extra::tempfile: replace mkdtemp with an RAII wrapperBenjamin Herr-16/+58
this incidentally stops `make check` from leaving directories in `/tmp`
2013-10-11De-pub some private runtime componentsAlex Crichton-1/+1
This change was waiting for privacy to get sorted out, which should be true now that #8215 has landed. Closes #4427
2013-10-09auto merge of #9386 : Geal/rust/base64-doc, r=alexcrichtonbors-10/+13
Standard is now uppercase in the base64 module, and from_base64 now returns a Result
2013-10-09Correct code examples for base64 documentationGeoffroy Couprie-10/+13
2013-10-09option: rewrite the API to use compositionDaniel Micay-35/+37
2013-10-09std::rand: Add a trait for seeding RNGs: SeedableRng.Huon Wilson-3/+3
This provides 2 methods: .reseed() and ::from_seed that modify and create respecitively. Implement this trait for the RNGs in the stdlib for which this makes sense.
2013-10-09std::rand: Add an implementation of ISAAC64.Huon Wilson-8/+8
This is 2x faster on 64-bit computers at generating anything larger than 32-bits. It has been verified against the canonical C implementation from the website of the creator of ISAAC64. Also, move `Rng.next` to `Rng.next_u32` and add `Rng.next_u64` to take full advantage of the wider word width; otherwise Isaac64 will always be squeezed down into a u32 wasting half the entropy and offering no advantage over the 32-bit variant.
2013-10-07Fix existing privacy/visibility violationsAlex Crichton-3/+4
This commit fixes all of the fallout of the previous commit which is an attempt to refine privacy. There were a few unfortunate leaks which now must be plugged, and the most horrible one is the current `shouldnt_be_public` module now inside `std::rt`. I think that this either needs a slight reorganization of the runtime, or otherwise it needs to just wait for the external users of these modules to get replaced with their `rt` implementations. Other fixes involve making things pub which should be pub, and otherwise updating error messages that now reference privacy instead of referencing an "unresolved name" (yay!).
2013-10-05Implement feature-gating for the compilerAlex Crichton-0/+2
A few features are now hidden behind various #[feature(...)] directives. These include struct-like enum variants, glob imports, and macro_rules! invocations. Closes #9304 Closes #9305 Closes #9306 Closes #9331
2013-10-05auto merge of #9734 : luisbg/rust/master, r=alexcrichtonbors-2/+0
These formats are already covered with 'T' | 'X' in line 571 and 'D' | 'x' in line 446.
2013-10-05extra: remove commented out 'X' and 'x' formatsLuis de Bethencourt-2/+0
These formats are already covered with 'T' | 'X' in line 571 and 'D' | 'x' in line 446.
2013-10-05auto merge of #9250 : erickt/rust/num, r=ericktbors-284/+489
This PR solves one of the pain points with c-style enums. Simplifies writing a fn to convert from an int/uint to an enum. It does this through a `#[deriving(FromPrimitive)]` syntax extension. Before this is committed though, we need to discuss if `ToPrimitive`/`FromPrimitive` has the right design (cc #4819). I've changed all the `.to_int()` and `from_int()` style functions to return `Option<int>` so we can handle partial functions. For this PR though only enums and `extra::num::bigint::*` take advantage of returning None for unrepresentable values. In the long run it'd be better if `i64.to_i8()` returned `None` if the value was too large, but I'll save this for a future PR. Closes #3868.
2013-10-05extra: fix BigInt on 32bit machinesErick Tryzelaar-127/+139
2013-10-05extra: Don't truncate {u64,i64} when converting to BigIntsErick Tryzelaar-19/+121
2013-10-03extra: remove unnecessary second level functionsLuis de Bethencourt-11/+4
do_strptime() and do_strftime()
2013-10-03auto merge of #9691 : alexcrichton/rust/rustdoc, r=cmrbors-1/+2
This slurps in the commits from #9684 as well as closing #9539.
2013-10-02auto merge of #9689 : luisbg/rust/strftime, r=alexcrichtonbors-8/+7
Plus testing added for %X and %x which were supported but not tested. Working towards #2350
2013-10-02rustdoc: Generate hyperlinks between cratesAlex Crichton-1/+2
The general idea of hyperlinking between crates is that it should require as little configuration as possible, if any at all. In this vein, there are two separate ways to generate hyperlinks between crates: 1. When you're generating documentation for a crate 'foo' into folder 'doc', then if foo's external crate dependencies already have documented in the folder 'doc', then hyperlinks will be generated. This will work because all documentation is in the same folder, allowing links to work seamlessly both on the web and on the local filesystem browser. The rationale for this use case is a package with multiple libraries/crates that all want to link to one another, and you don't want to have to deal with going to the web. In theory this could be extended to have a RUST_PATH-style searching situtation, but I'm not sure that it would work seamlessly on the web as it does on the local filesystem, so I'm not attempting to explore this case in this pull request. I believe to fully realize this potential rustdoc would have to be acting as a server instead of a static site generator. 2. One of foo's external dependencies has a #[doc(html_root_url = "...")] attribute. This means that all hyperlinks to the dependency will be rooted at this url. This use case encompasses all packages using libstd/libextra. These two crates now have this attribute encoded (currently at the /doc/master url) and will be read by anything which has a dependency on libstd/libextra. This should also work for arbitrary crates in the wild that have online documentation. I don't like how the version is hard-wired into the url, but I think that this may be a case-by-case thing which doesn't end up being too bad in the long run. Closes #9539
2013-10-02extra: %W and %+ support in time::strftimeLuis de Bethencourt-8/+7
Plus testing added for %X and %x which were supported but not tested. Working towards #2350
2013-10-02auto merge of #9675 : sfackler/rust/lint, r=alexcrichtonbors-0/+10
Closes #9671
2013-10-02auto merge of #9670 : luisbg/rust/strftime, r=alexcrichtonbors-8/+61
2013-10-02Check enums in missing_doc lintSteven Fackler-0/+10
Closes #9671
2013-10-02extra: %G, %g and %V support in time::strftimeLuis de Bethencourt-6/+59
Fixes #2350
2013-10-02extra: Add ToBigInt and ToBigUint traitsErick Tryzelaar-0/+90
2013-10-02std: Swap {To,From}Primitive to use the 64bit as the unimplemented versionErick Tryzelaar-24/+24
One downside with this current implementation is that since BigInt's default is now 64 bit, we can convert larger BigInt's to a primitive, however the current implementation on 32 bit architectures does not take advantage of this fact.
2013-10-02std: Replace num::IntConvertible with {To,From}PrimitiveErick Tryzelaar-214/+215
2013-10-02auto merge of #9665 : alexcrichton/rust/snapshot, r=brsonbors-13/+13
Uses the new snapshots to kill the old `loop` and introduce the new `continue`.
2013-10-01extra: %U support in time::strftimeLuis de Bethencourt-2/+2
Fixes #2350
2013-10-01Migrate users of 'loop' to 'continue'Alex Crichton-13/+13
Closes #9467
2013-10-01remove the `float` typeDaniel Micay-185/+152
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30syntax: Remove usage of fmt!Alex Crichton-2/+2
2013-09-30extra: Remove usage of fmt!Alex Crichton-421/+424
2013-09-27auto merge of #9552 : brson/rust/0.9-pre, r=alexcrichtonbors-1/+1