about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2014-06-18auto merge of #14984 : thestinger/rust/libc, r=alexcrichtonbors-6/+5
2014-06-18std: Remove dual export of `Show`Alex Crichton-1/+1
Closes #14996
2014-06-18fix signatures of mmap-related functions from libcDaniel Micay-6/+5
2014-06-16std: Chunk writing to stdout on windowsAlex Crichton-4/+15
This just takes a similar approach to reading stdin on windows by artificially limiting the size of the buffers going in and out. Closes #14940
2014-06-16std: Don't fail the task when a Future is droppedAlex Crichton-1/+27
It's a benign failure that no one needs to know about. Closes #14892
2014-06-16Move `num_cpus` from `std::rt::util` to `std::os`. Closes #14707Jorge Aparicio-13/+16
2014-06-16auto merge of #14781 : alexcrichton/rust/issue-14724, r=brsonbors-26/+76
* os::pipe() now returns `IoResult<os::Pipe>` * os::pipe() is now unsafe because it does not arrange for deallocation of file descriptors * PipeStream::pair() has been added. This is a safe method to get a pair of pipes. * Dealing with pipes in native process bindings have been improved to be more robust in the face of failure and intermittent errors. This converts a few fail!() situations to Err situations. cc #13538 Closes #14724 [breaking-change]
2014-06-16std: Improve pipe() functionalityAlex Crichton-26/+76
* os::pipe() now returns IoResult<os::Pipe> * os::pipe() is now unsafe because it does not arrange for deallocation of file descriptors * os::Pipe fields are renamed from input to reader and out to write. * PipeStream::pair() has been added. This is a safe method to get a pair of pipes. * Dealing with pipes in native process bindings have been improved to be more robust in the face of failure and intermittent errors. This converts a few fail!() situations to Err situations. Closes #9458 cc #13538 Closes #14724 [breaking-change]
2014-06-16std: Support consuming a Process without waitingAlex Crichton-0/+23
Forking off a child which survives the parent is often a useful task, and is currently not possible because the Process type will invoke `wait()` in its destructor in order to prevent leaking resources. This function adds a new safe method, `forget`, which can be used to consume an instance of `Process` which will then not call `wait` in the destructor. This new method is clearly documented as a leak of resources, but it must be forcibly opted in to. Closes #14467
2014-06-16auto merge of #14900 : alexcrichton/rust/snapshots, r=huonwbors-86/+36
Closes #14898 Closes #14918
2014-06-16auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichtonbors-11/+211
2014-06-15Register new snapshotsAlex Crichton-86/+36
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-4/+0
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-14Register new snapshotsAlex Crichton-8/+1
2014-06-13Rolling up PRs in the queueAlex Crichton-7/+12
Closes #14797 (librustc: Fix the issue with labels shadowing variable names by making) Closes #14823 (Improve error messages for io::fs) Closes #14827 (libsyntax: Allow `+` to separate trait bounds from objects.) Closes #14834 (configure: Don't sync unused submodules) Closes #14838 (Remove typo on collections::treemap::UnionItems) Closes #14839 (Fix the unused struct field lint for struct variants) Closes #14840 (Clarify `Any` docs) Closes #14846 (rustc: [T, ..N] and [T, ..N+1] are not the same) Closes #14847 (Audit usage of NativeMutex) Closes #14850 (remove unnecessary PaX detection) Closes #14856 (librustc: Take in account mutability when casting array to raw ptr.) Closes #14859 (librustc: Forbid `transmute` from being called on types whose size is) Closes #14860 (Fix `quote_pat!` & parse outer attributes in `quote_item!`)
2014-06-13librustc: Forbid `transmute` from being called on types whose size isPatrick Walton-1/+1
only known post-monomorphization, and report `transmute` errors before the code is generated for that `transmute`. This can break code that looked like: unsafe fn f<T>(x: T) { let y: int = transmute(x); } Change such code to take a type parameter that has the same size as the type being transmuted to. Closes #12898. [breaking-change]
2014-06-13std: Rebase better errors on masterAlex Crichton-7/+11
2014-06-13Improve error messages for io::fsYehuda Katz-64/+244
2014-06-13auto merge of #14831 : alexcrichton/rust/format-intl, r=brsonbors-82/+54
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-13Cosmetic fixes & commentsValerii Hiora-3/+8
2014-06-13auto merge of #14816 : theptrk/rust/unclear-comment, r=huonwbors-1/+1
The old comment left it unclear if this is creating a random value or doing a check as to whether or not the generator is available or some other operation. See: http://stackoverflow.com/questions/24153311/when-is-rng-gen-not-true
2014-06-12Basic iOS supportValerii Hiora-11/+206
2014-06-11auto merge of #14713 : darnuria/rust/Improve_std_os_documentation_#2, ↵bors-76/+140
r=alexcrichton Improving documentation, consistency, removes evils empty lines etc...
2014-06-12Improve docs and refactore std::os.Axel Viala-76/+140
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-82/+54
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-84/+51
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11auto merge of #14746 : alexcrichton/rust/libsync, r=brsonbors-6554/+322
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-11auto merge of #14250 : alexcrichton/rust/gc, r=brsonbors-33/+62
This commit removes `@T` from the compiler by moving the AST to using `Gc<T>`. This also starts treating `Gc<T>` as `@T` in the same way that `Box<T>` is the same as `~T` in the compiler. After this hits a snapshot, the `@T` syntax should be able to be removed completely.
2014-06-11sync: Move underneath libstdAlex Crichton-6554/+322
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-10/+9
2014-06-11rustc: Update how Gc<T> is recognizedAlex Crichton-34/+64
This commit uses the same trick as ~/Box to map Gc<T> to @T internally inside the compiler. This moves a number of implementations of traits to the `gc` module in the standard library. This removes functions such as `Gc::new`, `Gc::borrow`, and `Gc::ptr_eq` in favor of the more modern equivalents, `box(GC)`, `Deref`, and pointer equality. The Gc pointer itself should be much more useful now, and subsequent commits will move the compiler away from @T towards Gc<T> [breaking-change]
2014-06-11auto merge of #14789 : aochagavia/rust/prelude, r=alexcrichtonbors-1/+1
2014-06-10Fix unclear wording of commenttheptrk-1/+1
2014-06-10auto merge of #14764 : jbcrail/rust/fix-more-comments, r=alexcrichtonbors-1/+1
2014-06-10auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichtonbors-5/+5
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code. The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-10Pub use CheckedDiv in the preludeAdolfo Ochagavía-1/+1
2014-06-09std: adjust the TCP io doc example to work reliably.Huon Wilson-1/+6
Fixes #11576 by making the code never run (and hence never pass when the test was marked `should_fail`).
2014-06-09std: Move dynamic_lib from std::unstable to stdBrian Anderson-18/+13
This leaves a deprecated reexport in place temporarily. Closes #1457.
2014-06-09std: Remove the as_utf16_p functionsAlex Crichton-36/+20
These functions are all much better expressed via RAII using the to_utf16() method on strings. This refactoring also takes this opportunity to properly handle when filenames aren't valid unicode when passed through to the windows I/O layer by properly returning I/O errors. All previous users of the `as_utf16_p` or `as_utf16_mut_p` functions will need to convert their code to using `foo.to_utf16().append_one(0)` to get a null-terminated utf16 string. [breaking-change]
2014-06-09auto merge of #14554 : kmcallister/rust/plugin_registrar, r=cmrbors-1/+2
This implements the design in rust-lang/rfcs#86. It shouldn't be merged until that RFC is accepted, but it would be great if somebody has time to review the code before then.
2014-06-09Use phase(plugin) in bootstrap cratesKeegan McAllister-1/+2
Do this to avoid warnings on post-stage0 builds.
2014-06-09std: Read HOME instead of USERAlex Crichton-2/+2
Apparently one of the linux bots doesn't have the USER variable defined, and this fix will likely land more quickly than a fix to the bots.
2014-06-09auto merge of #14709 : alexcrichton/rust/collections, r=brsonbors-34/+34
This is mostly just a cosmetic change, continuing the work from #14333.
2014-06-09core: Move the collections traits to libcollectionsAlex Crichton-14/+14
This commit moves Mutable, Map, MutableMap, Set, and MutableSet from `core::collections` to the `collections` crate at the top-level. Additionally, this removes the `deque` module and moves the `Deque` trait to only being available at the top-level of the collections crate. All functionality continues to be reexported through `std::collections`. [breaking-change]
2014-06-08core: Rename `container` mod to `collections`. Closes #12543Brian Anderson-22/+22
Also renames the `Container` trait to `Collection`. [breaking-change]
2014-06-08auto merge of #14765 : rapha/rust/master, r=alexcrichtonbors-22/+23
2014-06-09Converted PortReader and ChanWriter to use Vec.Raphael Speyer-22/+23
2014-06-08Fix spelling errors in comments.Joseph Crail-10/+10
2014-06-08Remove the dead code identified by the new lintJakub Wieczorek-5/+5