about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-03-22std: replace uses of old deriving attribute with new oneAndrew Paseltiner-21/+21
2013-03-22auto merge of #5484 : pcwalton/rust/snapshots, r=pcwaltonbors-3/+0
2013-03-21auto merge of #5481 : thestinger/rust/deque, r=z0w0bors-0/+2
2013-03-21auto merge of #5480 : pcwalton/rust/at-const, r=pcwaltonbors-4/+22
r? @catamorphism
2013-03-21auto merge of #5479 : Kimundi/rust/str-dealloc, r=z0w0bors-3/+4
This makes the `trim` and `substr` functions return a slice instead of an `~str`, and removes the unnecessary `Trimmable` trait (`StrSlice` already contains the same functionality). Also moves the `ToStr` implementations for the three str types into the str module in anticipation of further untangling.
2013-03-21librustc: Register new snapshotsPatrick Walton-3/+0
2013-03-21librustc: Forbid destructors from being attached to any structs that might ↵Patrick Walton-4/+22
contain non-Owned fields. r=nmatsakis
2013-03-21deque: add a module docstringDaniel Micay-0/+2
2013-03-21auto merge of #5407 : jbclements/rust/add-assert-eq-macro, r=jbclementsbors-17/+3
Adds an assert_eq! macro that asserts that its two arguments are equal. Error messages can therefore be somewhat more informative than a simple assert, because the error message includes "expected" and "given" values.
2013-03-21Un-renamed trim and substr functions.Marvin Löbel-2/+2
2013-03-21Switched over substr and trim functions in str to be non-allocating, ↵Marvin Löbel-4/+5
temporary renamed them to better track use-sites
2013-03-21auto merge of #5466 : Kimundi/rust/view-slice-rename, r=bstriebors-28/+28
A slice now always refers to something that returns an borrowed pointer, views don't exist anymore. If you want to have an explictit copy of a slice, use `to_owned()`
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-28/+28
slice_unique
2013-03-20auto merge of #5456 : graydon/rust/fixups, r=pcwaltonbors-0/+1
Stage markers for stage3 and a trivial prelude fix.
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-32/+32
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-20auto merge of #5455 : pcwalton/rust/framework, r=catamorphismbors-2/+2
r? @catamorphism
2013-03-20change some uses of fail_unless to assert_eqJohn Clements-17/+3
2013-03-20libsyntax: Never use `::<>` in the type grammarPatrick Walton-2/+2
2013-03-20add stage3 markers where necessary for dist-snapGraydon Hoare-0/+1
2013-03-20core: add str::each{,i}_reverseErick Tryzelaar-11/+5
2013-03-19core: rename vec::rev_each{,i} to vec::each{,i}_reverseErick Tryzelaar-3/+3
I'm making this change because the _reverse suffix is more commonly used in libcore/libstd.
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-43/+68
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-18libsyntax: Stop parsing old lifetimes, except for the ones on data type ↵Patrick Walton-2/+2
declarations.
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-87/+87
notation. rs=delifetiming
2013-03-18core: Simplify uvll bindings and strip out currently-unused bitsBrian Anderson-18/+0
No more mapping uv structs to Rust structs
2013-03-18Give core::rt and std::net their own uvll bindingsBrian Anderson-16/+1955
I intend to do some big refactoring and don't want to deal w/ std just now
2013-03-15auto merge of #5404 : bstrie/rust/decopy, r=pcwaltonbors-21/+21
Also turn `copy` into `.clone()` in much of run-pass.
2013-03-15impl Clone for ~T, ~[T], ~strBen Striegel-21/+21
2013-03-15treemap: use each_mut instead of mutateDaniel Micay-7/+6
2013-03-15treemap: rm old FIXMEDaniel Micay-2/+0
2013-03-15deque: add documentationDaniel Micay-1/+24
2013-03-14MutableIter impl for Option + use it in treemapDaniel Micay-14/+5
2013-03-14auto merge of #5365 : thestinger/rust/map, r=catamorphismbors-1/+30
2013-03-13librustc: Remove "base types" from the language.Patrick Walton-29/+29
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-44/+51
2013-03-14Remove unused imports in stdILyoan-1/+0
2013-03-13add the mutate_values method to the Map traitDaniel Micay-1/+30
2013-03-13Remove `++` mode from the compiler (it is parsed as `+` mode)Niko Matsakis-2/+2
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-13Revamp foreign code not to consider the Rust modes. This requiresNiko Matsakis-8/+8
adjusting a few foreign functions that were declared with by-ref mode. This also allows us to remove by-val mode in the near future. With copy mode, though, we have to be careful because Rust will implicitly pass somethings by pointer but this may not be the C ABI rules. For example, rust will pass a struct Foo as a Foo*. So I added some code into the adapters to fix this (though the C ABI rules may put the pointer back, oh well). This patch also includes a lint mode for the use of by-ref mode in foreign functions as the semantics of this have changed.
2013-03-13auto merge of #5293 : brson/rust/logging, r=brsonbors-149/+146
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-149/+146
2013-03-11auto merge of #5310 : thestinger/rust/treeset, r=graydonbors-113/+94
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-11core: Add rt mod and add the new scheduler codeBrian Anderson-1939/+17
2013-03-11treemap: fix a bug in the union implementationDaniel Micay-0/+4
2013-03-11treemap: add more set testsDaniel Micay-0/+10
2013-03-11treemap: refactor the set operation testsDaniel Micay-80/+34
2013-03-11treemap: add more tests for set differenceDaniel Micay-16/+21
2013-03-11treemap: inline the TreeSet wrappersDaniel Micay-12/+20