about summary refs log tree commit diff
path: root/src/libstd/io
AgeCommit message (Collapse)AuthorLines
2014-10-25Add MemWriter::from_vecSteven Fackler-2/+7
2014-10-25Deprecate UdpStreamJulian Orth-0/+12
2014-10-25Make UdpStream block until the next non-empty msg.Julian Orth-13/+20
2014-10-20auto merge of #18070 : alexcrichton/rust/spring-cleaning, r=aturonbors-19/+0
This is a large spring-cleaning commit now that the 0.12.0 release has passed removing an amount of deprecated functionality. This removes a number of deprecated crates (all still available as cargo packages in the rust-lang organization) as well as a slew of deprecated functions. All `#[crate_id]` support has also been removed. I tried to avoid anything that was recently deprecated, but I may have missed something! The major pain points of this commit is the fact that rustc/syntax have `#[allow(deprecated)]`, but I've removed that annotation so moving forward they should be cleaned up as we go.
2014-10-20auto merge of #18108 : mahkoh/rust/buffered_reader, r=alexcrichtonbors-2/+11
This optimizes `read` for the case in which the number of bytes requested is larger than the internal buffer. Note that the first comparison occurs again right afterwards and should thus be free. The second comparison occurs only in the cold branch.
2014-10-20Optimize BufferedReader::read for large buffers.Julian Orth-2/+11
This optimizes `read` for the case in which the number of bytes requested is larger than the internal buffer. Note that the first comparison occurs again right afterwards and should thus be free. The second comparison occurs only in the cold branch.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-19/+0
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-17auto merge of #17998 : rapha/rust/master, r=alexcrichtonbors-15/+60
2014-10-16libstd: Remove all uses of {:?}.Luqman Aden-2/+2
2014-10-16impl Buffer for ChanReaderRaphael Speyer-15/+60
2014-10-13Clean up rustc warnings.NODA, Kai-41/+38
compiletest: compact "linux" "macos" etc.as "unix". liballoc: remove a superfluous "use". libcollections: remove invocations of deprecated methods in favor of their suggested replacements and use "_" for a loop counter. libcoretest: remove invocations of deprecated methods; also add "allow(deprecated)" for testing a deprecated method itself. libglob: use "cfg_attr". libgraphviz: add a test for one of data constructors. libgreen: remove a superfluous "use". libnum: "allow(type_overflow)" for type cast into u8 in a test code. librustc: names of static variables should be in upper case. libserialize: v[i] instead of get(). libstd/ascii: to_lowercase() instead of to_lower(). libstd/bitflags: modify AnotherSetOfFlags to use i8 as its backend. It will serve better for testing various aspects of bitflags!. libstd/collections: "allow(deprecated)" for testing a deprecated method itself. libstd/io: remove invocations of deprecated methods and superfluous "use". Also add #[test] where it was missing. libstd/num: introduce a helper function to effectively remove invocations of a deprecated method. libstd/path and rand: remove invocations of deprecated methods and superfluous "use". libstd/task and libsync/comm: "allow(deprecated)" for testing a deprecated method itself. libsync/deque: remove superfluous "unsafe". libsync/mutex and once: names of static variables should be in upper case. libterm: introduce a helper function to effectively remove invocations of a deprecated method. We still see a few warnings about using obsoleted native::task::spawn() in the test modules for libsync. I'm not sure how I should replace them with std::task::TaksBuilder and native::task::NativeTaskBuilder (dependency to libstd?) Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-10-10Register new snapshotsAlex Crichton-8/+6
Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks.
2014-10-10improve the performance of the vec![] macroDaniel Micay-1/+0
Closes #17865
2014-10-09std: Convert statics to constantsAlex Crichton-38/+38
This commit repurposes most statics as constants in the standard library itself, with the exception of TLS keys which precisely have their own memory location as an implementation detail. This commit also rewrites the bitflags syntax to use `const` instead of `static`. All invocations will need to replace the word `static` with `const` when declaring flags. Due to the modification of the `bitflags!` syntax, this is a: [breaking-change]
2014-10-07Remove use of `final` and `override` (now reserved)John Gallagher-1/+1
2014-10-07Rename slice::SliceNick Cameron-3/+3
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-15/+18
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-42/+41
2014-10-06Rename the file permission statics in std::io to be uppercaseP1start-60/+118
For example, this renames `GroupRWX` to `GROUP_RWX`, and deprecates the old name. Code using these statics should be updated accordingly.
2014-10-04Fix infinite recursion in Writer impl for &mut WriterBrian Koropoff-2/+2
Closes issue #17767
2014-10-03rollup merge of #17739 : eddyb/fix-process-testAlex Crichton-26/+0
2014-10-03Fix a race condition between remove_from_env and other io::process tests.Eduard Burtescu-26/+0
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-0/+1
2014-10-02rollup merge of #17719 : alexcrichton/diagnoseAlex Crichton-1/+3
2014-10-02std: Help diagnose a flaky testAlex Crichton-1/+3
This test has recently been failing on the bots, and I'm not entirely sure why. I haven't been able to reproduce locally or on the bots, so I'm adding some messages to help diagnose the problem hopefully.
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-41/+42
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-18/+15
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-15/+18
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-42/+41
2014-10-01Remove std::io::signalAaron Turon-238/+1
The `std::io::signal` API was only implemented under `librustuv`, which is now being removed. Rather than keep around an unimplemented API, this commit removes it altogether. See the [runtime removal RFC](https://github.com/rust-lang/rfcs/pull/230) for more context. See [green-rs](https://github.com/alexcrichton/green-rs/) for a possible migration path for signal handling code, although in the long run we plan to add native signal handling to `std::io`. [breaking-change]
2014-10-01Remove iotest macroAaron Turon-415/+599
This commit removes the `iotest!` macro from `std::io`. The macro was primarily used to ensure that all io-related tests were run on both libnative and libgreen/librustuv. However, now that the librustuv stack is being removed, the macro is no longer needed. See the [runtime removal RFC](https://github.com/rust-lang/rfcs/pull/230) for more context. [breaking-change]
2014-10-01auto merge of #17667 : wizeman/rust/fix-override-env, r=alexcrichtonbors-1/+16
In some build environments (such as chrooted Nix builds), `env` can only be found in the explicitly-provided PATH, not in default places such as /bin or /usr/bin. So we need to pass-through PATH when spawning the `env` sub-process. Fixes #17617
2014-10-01libstd: Pass-through PATH in test_override_envRicardo M. Correia-1/+16
In some build environments (such as chrooted Nix builds), `env` can only be found in the explicitly-provided PATH, not in default places such as /bin or /usr/bin. So we need to pass-through PATH when spawning the `env` sub-process. Fixes #17617
2014-09-30Fix libstdSteven Fackler-10/+10
2014-09-29rollup merge of #17548 : cgaebel/masterAlex Crichton-1/+1
2014-09-27auto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichtonbors-3/+3
cc #17490 Reopening of #16230
2014-09-26librustc: Give trait methods accessible via fewer autoderefs priorityPatrick Walton-4/+11
over inherent methods accessible via more autoderefs. This simplifies the trait matching algorithm. It breaks code like: impl Foo { fn foo(self) { // before this change, this will be called } } impl<'a,'b,'c> Trait for &'a &'b &'c Foo { fn foo(self) { // after this change, this will be called } } fn main() { let x = &(&(&Foo)); x.foo(); } To explicitly indicate that you wish to call the inherent method, perform explicit dereferences. For example: fn main() { let x = &(&(&Foo)); (***x).foo(); } Part of #17282. [breaking-change]
2014-09-25Ignore two I/O tests that are failing on the win32 botBrian Anderson-0/+2
2014-09-25Added bitflag toggling.Clark Gaebel-1/+1
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-3/+3
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-4/+4
2014-09-21Remove #[allow(deprecated)] from libstdAlex Crichton-23/+29
2014-09-18auto merge of #17249 : vadimcn/rust/env-keys, r=alexcrichtonbors-7/+76
Closes #16937
2014-09-17Pacify lint gods.Vadim Chugunov-2/+3
2014-09-17rollup merge of #17297 : treeman/net-unixAlex Crichton-5/+4
2014-09-17Case-insensitive environment keys.Vadim Chugunov-7/+75
2014-09-16Fallout from renamingAaron Turon-29/+29
2014-09-16Align with _mut conventionsAaron Turon-1/+1
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. [breaking-change]
2014-09-16Rename std::io::net::unix to std::io::net::pipe.Jonas Hietala-5/+4
Renamed as we may support pipes for other platforms. Closes #12093 [breaking-change]
2014-09-13librustc: Forbid inherent implementations that aren't adjacent to thePatrick Walton-14/+26
type they provide an implementation for. This breaks code like: mod foo { struct Foo { ... } } impl foo::Foo { ... } Change this code to: mod foo { struct Foo { ... } impl Foo { ... } } Additionally, if you used the I/O path extension methods `stat`, `lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have been moved to the the `std::io::fs::PathExtensions` trait. This breaks code like: fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Change this code to: use std::io::fs::PathExtensions; fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Closes #17059. RFC #155. [breaking-change]