summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-04-24libcore: remove @Rng from rand, and use traits instead.Huon Wilson-12/+13
Also, rename RandRes -> IsaacRng, and make the constructors static methods.
2013-04-24Implement Signed and Unsigned traits and remove related predicate functionsBrendan Zabarauskas-8/+25
2013-04-23Removing more unnecessary unsafe blocks throughoutAlex Crichton-19/+15
2013-04-22auto merge of #6013 : gifnksm/rust/bigint-quot-rem, r=graydonbors-56/+57
BigInt had been supported quot/rem and div/mod correctly, but after merging #5990 they have been broken. This commit fixes it.
2013-04-22auto merge of #5966 : alexcrichton/rust/issue-3083, r=graydonbors-22/+20
Closes #3083. This takes a similar approach to #5797 where a set is present on the `tcx` of used mutable definitions. Everything is by default warned about, and analyses must explicitly add mutable definitions to this set so they're not warned about. Most of this was pretty straightforward, although there was one caveat that I ran into when implementing it. Apparently when the old modes are used (or maybe `legacy_modes`, I'm not sure) some different code paths are taken to cause spurious warnings to be issued which shouldn't be issued. I'm not really sure how modes even worked, so I was having a lot of trouble tracking this down. I figured that because they're a legacy thing that I'd just de-mode the compiler so that the warnings wouldn't be a problem anymore (or at least for the compiler). Other than that, the entire compiler compiles without warnings of unused mutable variables. To prevent bad warnings, #5965 should be landed (which in turn is waiting on #5963) before landing this. I figured I'd stick it out for review anyway though.
2013-04-23libstd: correct bigint's quot/rem, div/modulogifnksm-56/+57
2013-04-22libstd: denominator isn't quotientHuon Wilson-1/+1
2013-04-22Rename Div operator trait to Quot and Modulo operator trait to RemBrendan Zabarauskas-75/+73
2013-04-20std: remove unused 'mut' variablesAlex Crichton-22/+20
2013-04-20Replaced many instances of reinterpret_cast with transmuteMatthijs Hofstra-24/+24
2013-04-19std: clean up tests (mostly unused unsafe blocks)Alex Crichton-132/+116
2013-04-19librustc: WIP patch for using the return value.Patrick Walton-10/+22
2013-04-19libstd: Micro-optimize vuint_atPatrick Walton-4/+53
2013-04-18core::comm: Modernize constructors to use `new`Brian Anderson-31/+31
2013-04-18Small typos, year date and URL of the fbuild system for reference.Olivier Saut-6/+7
2013-04-15auto merge of #5901 : thestinger/rust/iterator, r=sanxiynbors-3/+3
Can now use them like `x.transform(|i| i + 3).zip(y.filter(|i| i % 2)`.
2013-04-15auto merge of #5895 : huonw/rust/no-pub-tests, r=thestingerbors-254/+254
This patch is a sledge hammer that moves all tests into `#[cfg(test)] mod test { .. }`, and makes them private, there were several instances of `pub mod tests { #[test] pub fn ... } `. (The reason for this is I was playing with using `syntax` to index code ([result so far](http://www.ug.it.usyd.edu.au/~hwil7821/rust-api/)) and it was getting some junk from the tests.) The rustdoc commit is particularly brutal, so it's fine if that one isn't landed.
2013-04-15iterator: use an IteratorUtil traitDaniel Micay-3/+3
2013-04-16libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵Huon Wilson-254/+254
pub mod or pub fn).
2013-04-15auto merge of #5879 : astrieanna/rust/document_std_base64, r=catamorphismbors-1/+79
This adds examples for the methods in std::base64. Each example is complete in the sense that you can copy-paste it into a file and compile it successfully without adding anything (imports, etc). The hardest part of figuring out how to use this was figuring out the right import statements to put at the top.
2013-04-14Change to 4-space indents in code examplesLeah Hanson-14/+14
2013-04-14update copyright notice on base64.rsLeah Hanson-1/+1
2013-04-14std: remove unused unsafe blocks/functionsAlex Crichton-455/+405
2013-04-13Doc review, as requested :-).Dan Luu-8/+7
Mostly just phrasing things differently, which is a matter of taste. Feel free to use or not use any of the changes I'm suggesting. I would say this one thing should be changed, though, not necessarily the way I changed it here. * Convert any string (literal, `@`, `&`, `~`) * that contains a base64 encoded value, to the byte values it encodes. If this structure is going to be used, either the entire clause, 'that contains a base64 encoded value', should be bracketed by commas, or the comma at the end of the clause should be removed.
2013-04-13move rustdoc comments so that they attach to the functions rather than the ↵Leah Hanson-79/+79
impl blocks.
2013-04-13initial iterator object libraryDaniel Micay-164/+114
2013-04-12Add comments for the implementations of from_base64 and to_base64 for .Leah Hanson-0/+34
2013-04-12auto merge of #5827 : ↵bors-14/+390
nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton See #5656 for details. r? @pcwalton
2013-04-12add rustdoc comments with examples for the string versions of to_base64 and ↵Leah Hanson-0/+45
from_base64
2013-04-11auto merge of #5819 : erickt/rust/incoming, r=ericktbors-71/+279
Good morning, This first patch series adds support for `#[deriving(Decodable, Encodable)]`, but does not yet remove `#[auto_encode]` and `#[auto_decode]`. I need a snapshot to remove the old code. Along the way it also extends support for tuple structs and struct enum variants. Also, it includes a minor fix to the pretty printer. We decided a while ago to use 4 spaces to indent a match arm instead of 2. This updates the pretty printer to reflect that.
2013-04-10libstd: changes to in response to #5656Niko Matsakis-14/+390
2013-04-10syntax: add {read,emit}_enum_struct_variant{,_field}Erick Tryzelaar-4/+67
2013-04-10std: add serialize {read,emit}_tuple{,_arg,_struct,_struct_arg}Erick Tryzelaar-0/+70
2013-04-10std: rename {read,emit}_field to {read,emit}_struct_fieldErick Tryzelaar-5/+81
2013-04-10std: clean up the order of {De,En}codable methodsErick Tryzelaar-81/+80
2013-04-10Bump version to 0.7-preBrian Anderson-2/+2
2013-04-10Revert map.each to something which takes two parametersNiko Matsakis-68/+56
rather than a tuple. The current setup iterates over `BaseIter<(&'self K, &'self V)>` where 'self is a lifetime declared *in the each method*. You can't place such a type in the impl declaration. The compiler currently allows it, but this will not be legal under #5656 and I'm pretty sure it's not sound now.
2013-04-09Bump version to 0.7-preBrian Anderson-2/+2
2013-04-08Removing no longer needed unsafe blocksAlex Crichton-251/+225
2013-04-08Removing some mutable fields in libstdAlex Crichton-92/+91
2013-04-07Impl cmp/num traits for BigUint, BigIntgifnksm-145/+187
TotalEq, TotalOrd, FromStrRadix, ToStrRadix.
2013-04-05libstd: make complex.rs XXX's into issues and FIXME'sHuon Wilson-4/+3
2013-04-05libstd: add basic complex numbersHuon Wilson-0/+318
2013-04-05libstd: add basic rational numbersHuon Wilson-0/+513
2013-04-05libstd: move bigint to dedicated num directoryHuon Wilson-0/+1
2013-04-04Fix fileinput test failILyoan-1/+1
2013-04-03auto merge of #5701 : metajack/rust/net-url-clone, r=thestingerbors-3/+3
2013-04-03Add Clone derivation for std::net::url types.Jack Moffitt-3/+3
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-33/+33
2013-04-03hashmap: rm linear namespaceDaniel Micay-6/+6