about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2013-09-05auto merge of #8990 : thestinger/rust/str, r=alexcrichtonbors-11/+0
mapping a function against the elements should not require allocating a new container, but `collect` still provides the functionality as-needed
2013-09-05Remove the __log function for __log_levelAlex Crichton-1/+9
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-05str: rm `map_chars`, replaced by iteratorsDaniel Micay-11/+0
mapping a function against the elements should not require allocating a new container, but `collect` still provides the functionality as-needed
2013-09-04auto merge of #8944 : alexcrichton/rust/issue-8938, r=huonwbors-0/+11
Otherwise extra stuff after a lone '}' character is simply ignored, which is very bad. Closes #8938
2013-09-05Add from_str docsCorey Richardson-0/+1
2013-09-05Add a from_str function that calls out to the associated method on the traitCorey Richardson-0/+5
2013-09-04std::str: Deny surrogates in is_utf8blake2-ppc-3/+12
Reject codepoints \uD800 to \uDFFF which are the surrogates (reserved/unused codepoints that are invalid to encode into UTF-8) The surrogates is the only hole of invalid codepoints in the range from \u0 to \u10FFFF.
2013-09-04auto merge of #8978 : pnkfelix/rust/make-path-api-less-allocation-happy, r=huonwbors-25/+25
A [dialogue](https://github.com/mozilla/rust/pull/8909#discussion-diff-6102725) on PR #8909 inspired me to make this change. r? anyone (It is possible that `std::path` itself will soon be replaced with a new implementation that kballard's working on, as mentioned in the dialogue linked above, but this revision is simple enough that I figured I'd offer it up.)
2013-09-05Implement Stream automatically for Reader + WriterChris Morgan-0/+2
This is consistent with the existing documentation but was not the actual behaviour, which I've found to be rather a nuisance, actually.
2013-09-04auto merge of #8977 : pnkfelix/rust/fsk-followup-on-6009-rebased, r=alexcrichtonbors-10/+9
Fix #6009. Rebased version of #8970. Inherits review from alexcrichton.
2013-09-04auto merge of #8935 : blake2-ppc/rust/reader-bytes, r=brsonbors-1/+89
An iterator that simply calls `.read_bytes()` each iteration. I think choosing to own the Reader value and implementing Decorator to allow extracting it is the most generically useful. The Reader type variable can of course be some kind of reference type that implements Reader. In the generic form the `Bytes` iterator is well behaved itself and does not read ahead. It performs abysmally on top of a FileStream, and much better if a buffering reader is inserted inbetween.
2013-09-04auto merge of #8880 : fhahn/rust/issue_8703, r=brsonbors-15/+248
I've started working on #8703. RUST_LOG="::help" should work, I hope I'll be able to finish the rest this weekend.
2013-09-04auto merge of #8901 : adridu59/rust/issue-8511, r=huonwbors-1/+7
Android has no /tmp partition, cf. #8511.
2013-09-04Another followup on #6009.Felix S. Klock II-1/+2
Odd that my earlier make checks did not catch this.
2013-09-04libstd/os: set tmp dir to /data/tmp on Androidadridu59-1/+7
Android has no /tmp partition, return /data/tmp instead. Cf. #8511.
2013-09-04Convert rust_log.cpp to Rust, closes #8703Florian Hahn-15/+248
2013-09-04stop treating char as an integer typeDaniel Micay-94/+83
Closes #7609
2013-09-04Revise path.rs API to not allocate ~str so much.Felix S. Klock II-25/+25
Note that I left dirname as returning ~str, because both of its implementations work by calling dir_path, which produces a new path, and thus we cannot borrow the result from &'a self passed to dirname (because the new path returned by dir_path will not live long enough to satisfy the lifetime 'a).
2013-09-04auto merge of #8960 : Kimundi/rust/master, r=alexcrichtonbors-1/+27
Changed ToStr impl for Ascii Added ToStr impl for char
2013-09-04Added explicit pub to several conditions. Enables completion of #6009.Felix S. Klock II-9/+7
2013-09-03Raise errors on format strings with unmatched `}`Alex Crichton-0/+11
Otherwise extra stuff after a lone '}' character is simply ignored, which is very bad. Closes #8938
2013-09-03auto merge of #8943 : alexcrichton/rust/issue-8904, r=brsonbors-2/+8
We already do this for libstd tests automatically, and compiletest runs into the same problems where when forking lots of processes lots of file descriptors are created. On OSX we can use specific syscalls to raise the limits, in this situation, though. Closes #8904
2013-09-03auto merge of #8942 : novalis/rust/fmt, r=alexcrichtonbors-0/+7
2013-09-03Test and document escaping on format!()novalis-0/+7
2013-09-03auto merge of #8963 : jmgrosen/rust/issue-8881, r=alexcrichtonbors-0/+6
2013-09-04Added ToStr impl for charMarvin Löbel-1/+27
Changed ToStr impl for Ascii
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-0/+6
2013-09-03auto merge of #8954 : anasazi/rust/tcp-acceptor, r=catamorphismbors-160/+234
The Listener trait takes two type parameters, the type of connection and the type of Acceptor, and specifies only one method, listen, which consumes the listener and produces an Acceptor. The Acceptor trait takes one type parameter, the type of connection, and defines two methods. The accept() method waits for an incoming connection attempt and returns the result. The incoming() method creates an iterator over incoming connections and is a default method. Example: ```rust let listener = TcpListener.bind(addr); // Bind to a socket let acceptor = listener.listen(); // Start the listener for stream in acceptor.incoming() { // Process incoming connections forever (a failure will kill the task). } ``` Closes #8689
2013-09-03rt::io: Rename Bytes to ByteIterator and add note about iterationblake2-ppc-8/+14
2013-09-03auto merge of #8934 : sfackler/rust/bufreader, r=brsonbors-3/+39
2013-09-03auto merge of #8947 : thestinger/rust/name, r=huonwbors-5/+20
Storing the type name in the `tydesc` aims to avoid the need to pass a type name in almost every single visitor method. It would likely be much saner for `repr` to simply be passed the `TyDesc` corresponding to the function or just the type name, but this is good enough for now.
2013-09-03auto merge of #8884 : blake2-ppc/rust/exact-size-hint, r=huonwbors-62/+150
The message of the first commit explains (edited for changed trait name): The trait `ExactSize` is introduced to solve a few small niggles: * We can't reverse (`.invert()`) an enumeration iterator * for a vector, we have `v.iter().position(f)` but `v.rposition(f)`. * We can't reverse `Zip` even if both iterators are from vectors `ExactSize` is an empty trait that is intended to indicate that an iterator, for example `VecIterator`, knows its exact finite size and reports it correctly using `.size_hint()`. Only adaptors that preserve this at all times, can expose this trait further. (Where here we say finite for fitting in uint). --- It may seem complicated just to solve these small "niggles", (It's really the reversible enumerate case that's the most interesting) but only a few core iterators need to implement this trait. While we gain more capabilities generically for some iterators, it becomes a tad more complicated to figure out if a type has the right trait impls for it.
2013-09-03repr: add very basic support for functionsDaniel Micay-5/+17
Closes #8917
2013-09-03add type name to the tydescDaniel Micay-0/+3
Closes #8926
2013-09-02Raise the file descriptor limits when running compiletestAlex Crichton-2/+8
We already do this for libstd tests automatically, and compiletest runs into the same problems where when forking lots of processes lots of file descriptors are created. On OSX we can use specific syscalls to raise the limits, in this situation, though. Closes #8904
2013-09-02Fix the std::fmt doc-block to show up in pandocAlex Crichton-1/+1
2013-09-02Implement BufReaderSteven Fackler-3/+39
2013-09-02auto merge of #8927 : thestinger/rust/repr, r=huonwbors-23/+52
2013-09-02repr: handle tuple structs sanelyDaniel Micay-18/+33
Closes #8919
2013-09-02repr: add support for trait objectsDaniel Micay-4/+9
Closes #8916
2013-09-02repr: print functions as `fn()`Daniel Micay-1/+10
2013-09-01Fix #8898novalis-2/+3
2013-09-02rt::io: Add Bytes iterator for Readerblake2-ppc-1/+83
An iterator that simply calls `.read_bytes()` each iteration. I think choosing to own the Reader value and implementing Decorator to allow extracting it is the most generically useful. The Reader type variable can of course be some kind of reference type that implements Reader.
2013-09-01std/extra: Add ExactSize for Bitv, DList, RingBuf, Option iteratorsblake2-ppc-1/+3
2013-09-01std::iterator: Use ExactSize, inheriting DoubleEndedIteratorblake2-ppc-52/+43
Address discussion with acrichto; inherit DoubleEndedIterator so that `.rposition()` can be a default method, and that the nische of the trait is clear. Use assertions when using `.size_hint()` in reverse enumerate and `.rposition()`
2013-09-01std::iterator: Add back .rposition() testblake2-ppc-10/+25
2013-09-01auto merge of #8276 : kballard/rust/iterator-protocol, r=cmrbors-6/+122
r? @thestinger
2013-08-31auto merge of #8899 : thestinger/rust/repr, r=huonwbors-21/+31
2013-08-31repr: remove trailing {} from unit-like structsDaniel Micay-7/+11
2013-08-31repr: print the name of structsDaniel Micay-19/+25