about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-05-08libstd: Remove mutable fields from flatpipes and io_utilPatrick Walton-13/+15
2013-05-08libstd: Remove mutable fields from fileinput and net_tcpPatrick Walton-21/+23
2013-05-08fix incorrect region code based on the old 'selfDaniel Micay-6/+6
also removes unnecessary casts from the RcMut implementation
2013-05-09Fix typosSean Moon-14/+14
2013-05-08libstd: convert chained ifs to a match in base64.Huon Wilson-24/+20
2013-05-08auto merge of #6317 : brson/rust/durable, r=z0w0bors-2/+2
#6312
2013-05-08auto merge of #6305 : thestinger/rust/rc, r=nikomatsakisbors-6/+8
2013-05-07auto merge of #6301 : bjz/rust/numeric-traits, r=pcwaltonbors-0/+14
This is part of the redesign of the numeric traits tracked in issue #4819. Renamed: - `Exponential::expm1` -> `Float::exp_m1` - for consistency with underscore usage elsewhere - `Exponential::log` -> `Exponential::ln` - a less ambiguous name for the natural logarithm - `{float, f64, f32}::logarithm` -> `Exponential::log` - for arbitrary base logarithms - `Real::log_2` -> `Real::ln_2` - for consistency with `ln` - `Real::log_10` -> `Real::ln_10` - for consistency with `ln` Added: - `Signed::abs_sub` - wraps libm's `fdim` function - `Float::is_normal` - returns `true` if the number is neither zero, infinite, subnormal or NaN - `Float::classify` - returns the floating point category of the number - `Float::ln_1p` - returns the natural logarithm of the number plus one
2013-05-07std: Replace Durable with 'staticBrian Anderson-2/+2
2013-05-07arc: mark RWARC as non-ConstDaniel Micay-0/+1
2013-05-07rc: remove the managed pointer workaroundDaniel Micay-6/+7
2013-05-07auto merge of #6276 : brson/rust/issue-6122, r=graydonbors-0/+1
2013-05-07Add abs_sub method to Signed traitBrendan Zabarauskas-0/+14
2013-05-06auto merge of #6236 : alexcrichton/rust/more-map-methods, r=thestingerbors-27/+91
Closes #5392 and #5393 I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation. One thing I did notice is that with default methods it'd be really nice to define `insert` and `remove` in terms of `pop` and `swap` (or vice versa, just to have them available).
2013-05-07Add pop() and swap() to the Map traitAlex Crichton-27/+91
2013-05-06auto merge of #6241 : thestinger/rust/rc, r=pcwaltonbors-0/+276
To provide a reference counted pointer type with deterministic destruction once managed boxes are switched over to a garbage collector. Unlike managed boxes, these can be moved instead of just copied/cloned which is helpful for avoiding reference counts. Needs #5601 to be fixed in order for safety to be provided without the current ugly workaround of making the pointers contain `Option<@()>` and `Option<@mut ()>` (which are just set to `None`). @brson: r?
2013-05-06add task-local reference counted smart pointersDaniel Micay-0/+276
To provide a reference counted pointer type with deterministic destruction once managed boxes are switched over to a garbage collector. Unlike managed boxes, these can be moved instead of just copied/cloned which is helpful for avoiding reference counts.
2013-05-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-103/+0
2013-05-06std: Workaround bustage on incoming. #6122Brian Anderson-0/+1
2013-05-06Adust arena test: can no longer allocate recursivelyNiko Matsakis-3/+0
2013-05-06Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq'Brendan Zabarauskas-103/+0
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-850/+1219
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-04Register snapshotsBrian Anderson-2525/+0
2013-05-04auto merge of #6230 : thestinger/rust/whitespace, r=catamorphismbors-3/+0
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).
2013-05-03auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphismbors-10/+3
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-3/+0
2013-05-03std: Warning policeTim Chevalier-10/+3
2013-05-03tidyTim Chevalier-1/+1
2013-05-03rustpkg: Implement install commandTim Chevalier-1/+25
The install command should work now, though it only installs in-place (anything else has to wait until I implement RUST_PATH). Also including: core: Add remove_directory_recursive, change copy_file Make copy_file preserve permissions, and add a remove_directory_recursive function.
2013-05-03auto merge of #6185 : gifnksm/rust/prelude-from_str, r=graydonbors-9/+4
`core::prelude` re-exports `core::to_str::ToStr`, but doesn't re-export `core::from_str::FromStr`. That is inconsistent.
2013-05-03Remove extra `#[cfg(stage0)]`gifnksm-2/+0
2013-05-02std: xfail test_serializing_pipesBrian Anderson-0/+1
2013-05-02librustc: Update the serializer to work properly with INHTWAMA, removing ↵Patrick Walton-203/+2721
mutable fields in the process
2013-05-02libstd: De-mut arenaPatrick Walton-51/+89
2013-05-02libcore: Export core::from_str::FromStr from core::preludegifnksm-8/+5
2013-05-02More cases of [cfg(test)] instead of [test].Felix S. Klock II-1/+1
2013-05-02mod items need to be marked with `cfg(test)` not `test`.Felix S. Klock II-1/+1
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-74/+0
2013-05-02libstd: impl Clone for BigUint/BigInt and replace `copy` with `.clone()`gifnksm-11/+13
2013-05-01keep old sort for stage0Niko Matsakis-0/+1239
2013-05-01correct incorrect handling of overloaded operators, exposing various other ↵Niko Matsakis-62/+78
bits of rot
2013-05-01auto merge of #6147 : bjz/rust/numeric-traits, r=brsonbors-70/+67
After much discussion on IRC and #4819, we have decided to revert to the old naming of the `/` operator. This does not change its behavior. In making this change, we also have had to rename some of the methods in the `Integer` trait. Here is a list of the methods that have changed: - `Quot::quot` -> `Div::div` - `Rem::rem` - stays the same - `Integer::quot_rem` -> `Integer::div_rem` - `Integer::div` -> `Integer::div_floor` - `Integer::modulo` -> `Integer::mod_floor` - `Integer::div_mod` -> `Integer::div_mod_floor`
2013-05-01Revert rename of Div to QuotBrendan Zabarauskas-70/+67
2013-04-30core/std: Fix race condition in os::mkdir_recursive testsTim Chevalier-21/+29
Added a change_dir_locked function to os, and use it in the mkdir_recursive tests so that the tests don't clobber each other's directory changes.
2013-04-30allover: numerous unused muts etcNiko Matsakis-4/+3
2013-04-30new borrow checker (mass squash)Niko Matsakis-53/+65
2013-04-30desnapshotNiko Matsakis-3/+0
2013-04-30adapt to snapshotNiko Matsakis-376/+0
2013-04-29auto merge of #6108 : gifnksm/rust/bigint-shift-bug, r=brsonbors-21/+39
`std::bigint` contains the following code. ```rust borrow = *elem << (uint::bits - n_bits); ``` The code above contains a bug that the value of the right operand of the shift operator exceeds the size of the left operand, because sizeof(*elem) == 32, and 0 <= n_bits < 32 in 64bit architecture. If `--opt-level` option is not given to rustc, the code above runs as if the right operand is `(uint::bits - n_bits) % 32`, but if --opt-level is given, `borrow` is always zero. I wonder why this bug is not catched in the libstd's testsuite (I try the `rustc --test --opt-level=2 bigint.rs` before fixing the bug, but the unittest passes normally.) This pull request also removes the implicit vector copies in `bigint.rs`.
2013-04-29auto merge of #6107 : catamorphism/rust/mkdir_recursive, r=brsonbors-6/+59
r? @brson This hopefully addresses your concerns about the termination condition, and adds more tests. With a bonus documentation commit.