about summary refs log tree commit diff
path: root/src/libstd/old_io/net
AgeCommit message (Collapse)AuthorLines
2015-04-14std: Remove old_io/old_path/rand modulesAlex Crichton-3721/+0
This commit entirely removes the old I/O, path, and rand modules. All functionality has been deprecated and unstable for quite some time now!
2015-04-07std: Deny most warnings in doctestsAlex Crichton-2/+2
Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes #18199
2015-04-02Auto merge of #23877 - richo:gardening, r=Manishearthbors-2/+1
I also wanted to unignore https://github.com/rust-lang/rust/blob/master/src/libsyntax/ext/expand.rs#L1768-L1777 since the issue it references is closed, but the test fails, and it's internals aren't super clear to me.
2015-04-01std: Unignore a test for #10663Richo Healey-2/+1
This issue is long closed. It seems that unwrapping will always panic though.
2015-04-01Fallout in public-facing and semi-public-facing libsNiko Matsakis-5/+5
2015-03-31Test fixes and rebase conflicts, round 1Alex Crichton-1/+1
2015-03-31replace deprecated as_slice()Emeliov Dmitrii-1/+1
2015-03-28Remove IteratorExtSteven Fackler-2/+2
All methods are inlined into Iterator with `Self: Sized` bounds to make sure Iterator is still object safe. [breaking-change]
2015-03-28Rollup merge of #23803 - richo:unused-braces, r=ManishearthManish Goregaokar-1/+1
Pretty much what it says on the tin.
2015-03-28cleanup: Remove unused braces in use statementsRicho Healey-1/+1
2015-03-27rollup merge of #23749: alexcrichton/remove-old-impl-checkAlex Crichton-4/+6
Conflicts: src/libsyntax/feature_gate.rs
2015-03-26rustc: Remove support for old_impl_checkAlex Crichton-4/+6
This commit removes compiler support for the `old_impl_check` attribute which should in theory be entirely removed now. The last remaining use of it in the standard library has been updated by moving the type parameter on the `old_io::Acceptor` trait into an associated type. As a result, this is a breaking change for all current users of the deprecated `old_io::Acceptor` trait. Code can be migrated by using the `Connection` associated type instead. [breaking-change]
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-24/+24
Now that support has been removed, all lingering use cases are renamed.
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+9
2015-03-20std: Remove old_io/old_path from the preludeAlex Crichton-9/+12
This commit removes the reexports of `old_io` traits as well as `old_path` types and traits from the prelude. This functionality is now all deprecated and needs to be removed to make way for other functionality like `Seek` in the `std::io` module (currently reexported as `NewSeek` in the io prelude). Closes #23377 Closes #23378
2015-03-18Register new snapshotsAlex Crichton-5/+0
2015-03-17Rollup merge of #23329 - jbcrail:rm-syntax-highlight, r=sanxiynManish Goregaokar-1/+1
As suggested by @steveklabnik in #23254, I removed the redundant Rust syntax highlighting from the documentation.
2015-03-16impl<T> [T]Jorge Aparicio-0/+1
2015-03-16impl strJorge Aparicio-0/+3
2015-03-13Remove explicit syntax highlight from docs.Joseph Crail-1/+1
2015-03-11Example -> ExamplesSteve Klabnik-7/+7
This brings comments in line with https://github.com/rust-lang/rfcs/blob/master/text/0505-api-comment-conventions.md#using-markdown
2015-03-06std: Deprecate the std::old_io::net primitivesAlex Crichton-0/+10
The `std::net` primitives should be ready for use now and as a result the old ones are now deprecated and slated for removal. Most TCP/UDP functionality is now available through `std::net` but the `std::old_io::net::pipe` module is removed entirely from the standard library. Unix socket funtionality can be found in sfackler's [`unix_socket`][unix] crate and there is currently no replacement for named pipes on Windows. [unix]: https://crates.io/crates/unix_socket [breaking-change]
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-17/+17
2015-03-03Add `: Box<_>` or `::Box<_>` type annotations to various places.Felix S. Klock II-6/+6
This is the kind of change that one is expected to need to make to accommodate overloaded-`box`. ---- Note that this is not *all* of the changes necessary to accommodate Issue 22181. It is merely the subset of those cases where there was already a let-binding in place that made it easy to add the necesasry type ascription. (For unnamed intermediate `Box` values, one must go down a different route; `Box::new` is the option that maximizes portability, but has potential inefficiency depending on whether the call is inlined.) ---- There is one place worth note, `run-pass/coerce-match.rs`, where I used an ugly form of `Box<_>` type ascription where I would have preferred to use `Box::new` to accommodate overloaded-`box`. I deliberately did not use `Box::new` here, because that is already done in coerce-match-calls.rs. ---- Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-8/+8
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18std: Implement CString-related RFCsAlex Crichton-3/+3
This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type to the module. [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md The new `CStr` type is only constructable via two methods: 1. By `deref`'ing from a `CString` 2. Unsafely via `CStr::from_ptr` The purpose of `CStr` is to be an unsized type which is a thin pointer to a `libc::c_char` (currently it is a fat pointer slice due to implementation limitations). Strings from C can be safely represented with a `CStr` and an appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr` instead to allow producers to pass in C-originating strings instead of just Rust-allocated strings. A new constructor was added to `CString`, `new`, which takes `T: IntoBytes` instead of separate `from_slice` and `from_vec` methods (both have been deprecated in favor of `new`). The `new` method returns a `Result` instead of panicking. The error variant contains the relevant information about where the error happened and bytes (if present). Conversions are provided to the `io::Error` and `old_io::IoError` types via the `FromError` trait which translate to `InvalidInput`. This is a breaking change due to the modification of existing `#[unstable]` APIs and new deprecation, and more detailed information can be found in the two RFCs. Notable breakage includes: * All construction of `CString` now needs to use `new` and handle the outgoing `Result`. * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call. * The `as_slice*` methods have been removed in favor of just having the `as_bytes*` methods. Closes #22469 Closes #22470 [breaking-change]
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-8/+8
2015-02-17rollup merge of #22319: huonw/send-is-not-staticAlex Crichton-1/+1
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
2015-02-17rollup merge of #22435: aturon/final-stab-threadAlex Crichton-101/+101
Conflicts: src/test/bench/rt-messaging-ping-pong.rs src/test/bench/rt-parfib.rs src/test/bench/task-perf-spawnalot.rs
2015-02-18Update tests for the Send - 'static change.Huon Wilson-1/+1
2015-02-17Fallout from stabilizationAaron Turon-101/+101
2015-02-17openbsd: adapt connect_error testSébastien Marie-1/+3
The connect_error test check if connecting to "0.0.0.0:1" works (it shouldn't). And in case of error, the test expects a ConnectionRefused error. Under OpenBSD, trying to connect to "0.0.0.0" isn't a ConnectionRefused: it is an InvalidInput error. The patch allow the error to be ConnectionRefused or InvalidInput.
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+0
2015-02-04remove all kind annotations from closuresJorge Aparicio-10/+10
2015-02-03Rename std::path to std::old_pathAaron Turon-1/+1
As part of [RFC 474](https://github.com/rust-lang/rfcs/pull/474), this commit renames `std::path` to `std::old_path`, leaving the existing path API in place to ease migration to the new one. Updating should be as simple as adjusting imports, and the prelude still maps to the old path APIs for now. [breaking-change]
2015-02-02`for x in xs.into_iter()` -> `for x in xs`Jorge Aparicio-1/+1
Also `for x in option.into_iter()` -> `if let Some(x) = option`
2015-02-02`for x in xs.iter_mut()` -> `for x in &mut xs`Jorge Aparicio-1/+1
Also `for x in option.iter_mut()` -> `if let Some(ref mut x) = option`
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-1/+1
2015-01-31Kill more `isize`sTobias Bucher-3/+3
2015-01-30Test fixes and rebase conflictsAlex Crichton-4/+4
Also some tidying up of a bunch of crate attributes
2015-01-30rollup merge of #21631: tbu-/isize_policeAlex Crichton-5/+5
Conflicts: src/libcoretest/iter.rs
2015-01-30std: Stabilize FromStr and parseAlex Crichton-49/+59
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
2015-01-30Remove all `i` suffixesTobias Bucher-5/+5
2015-01-29s/Show/Debug/gJorge Aparicio-7/+7
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-14/+14
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29Auto merge of #21680 - japaric:slice, r=alexcrichtonbors-1/+1
Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-0/+3688
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-27cleanup: s/`v.slice*()`/`&v[a..b]`/g + remove redundant `as_slice()` callsJorge Aparicio-1/+1
2015-01-26std: Rename Writer::write to Writer::write_allAlex Crichton-2/+2
In preparation for upcoming changes to the `Writer` trait (soon to be called `Write`) this commit renames the current `write` method to `write_all` to match the semantics of the upcoming `write_all` method. The `write` method will be repurposed to return a `usize` indicating how much data was written which differs from the current `write` semantics. In order to head off as much unintended breakage as possible, the method is being deprecated now in favor of a new name. [breaking-change]
2015-01-26std: Rename io to old_ioAlex Crichton-0/+3679
In preparation for the I/O rejuvination of the standard library, this commit renames the current `io` module to `old_io` in order to make room for the new I/O modules. It is expected that the I/O RFCs will land incrementally over time instead of all at once, and this provides a fresh clean path for new modules to enter into as well as guaranteeing that all old infrastructure will remain in place for some time. As each `old_io` module is replaced it will be deprecated in-place for new structures in `std::{io, fs, net}` (as appropriate). This commit does *not* leave a reexport of `old_io as io` as the deprecation lint does not currently warn on this form of use. This is quite a large breaking change for all imports in existing code, but all functionality is retained precisely as-is and path statements simply need to be renamed from `io` to `old_io`. [breaking-change]