about summary refs log tree commit diff
path: root/src/libstd/io/error.rs
AgeCommit message (Collapse)AuthorLines
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-5/+5
2019-03-05libstd: implement Error::source for io::ErrorSean McArthur-0/+8
2019-02-28libstd => 2018Taiki Endo-9/+9
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-17deny intra-doc link resolution failures in libstdAndy Russell-0/+3
2018-12-12Bump to 1.33.0Alex Crichton-0/+1
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-07Add x86_64-fortanix-unknown-sgx target to libstd and dependenciesJethro Beekman-1/+1
The files src/libstd/sys/sgx/*.rs are mostly copied/adapted from the wasm target. This also updates the dlmalloc submodule to the very latest version.
2018-10-06'a' → 'an' in front of vowel sounds.Corey Farwell-1/+1
2018-10-03Remove main() from examplesSon-5/+3
2018-09-27Doc for From ErrorKindSon-3/+12
2018-08-20Add doc for impl From for ErrorSon-0/+6
2018-08-15Make std::io::Error #[non_exhaustive]varkor-10/+1
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-7/+7
2018-01-30std: use more portable error number in from_raw_os_error docsJames Cowgill-4/+4
On MIPS, error number 98 is not EADDRINUSE (it is EPROTOTYPE). To fix the resulting test failure this causes, use a more portable error number in the example documentation. EINVAL shold be more reliable because it was defined in the original Unix as 22 so hopefully most derivatives have defined it the same way.
2018-01-13Better Debug impl for io::Error.Clar Charr-8/+35
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-08-10Add missing links for Error docsGuillaume Gomez-1/+4
2017-08-10Add missing links in io::Error docsGuillaume Gomez-7/+11
2017-06-04inline io::Error creation from ErrorKindarthurprs-0/+1
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-2/+2
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-01-22libstd: replace all `try!` with `?` in documentation examplesUtkarsh Kukreti-1/+1
See #38644.
2017-01-13Change `to_owned` to `to_string` in docsStjepan Glavina-2/+2
We should teach conversion from `str` to `String` using `to_string` rather than the legacy `to_owned`.
2016-11-05Rollup merge of #37537 - GuillaumeGomez:error_kind_doc, r=steveklabnikAlex Crichton-2/+7
Add missing urls for ErrorKind's variants r? @steveklabnik
2016-11-02Add missing urls for ErrorKind's variantsGuillaume Gomez-2/+7
2016-11-02Add a new non-heap allocated variant to io::Error's representation.Mark-Simulacrum-21/+48
Implement From<ErrorKind> for io::Error, intended for use with errors that should never be exposed to the user.
2016-08-31Rollup merge of #35911 - tbu-:pr_io_errorkind_traits, r=alexcrichtonJonathan Turner-2/+3
Implement more traits for `std::io::ErrorKind` This makes it possible to use it as key in various maps.
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-5/+0
2016-08-24Restore old ordering of `io::ErrorKind`sTobias Bucher-3/+4
2016-08-23Implement more traits for `std::io::ErrorKind`Tobias Bucher-6/+6
This makes it possible to use it as key in various maps.
2016-07-30Add urls in std::io typesGuillaume Gomez-1/+7
2016-07-29Add io::Error doc examplesGuillaume Gomez-0/+145
2016-07-06Add doc examples for `io::Error::from_raw_os_error`.Corey Farwell-0/+24
2016-05-03Remove unused trait imports flagged by lintSeo Sanghyeon-1/+0
2016-03-12std: Clean out deprecated APIsAlex Crichton-8/+0
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2015-12-29Fix warnings when compiling stdlib with --testFlorian Hahn-1/+1
2015-12-10std: improve io error descriptionsSean McArthur-1/+23
2015-12-09doc: these are just renames, so avoid duplicationTshepang Lekhonkhobe-6/+1
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-1/+13
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-10-14fix tidyManish Goregaokar-1/+1
2015-10-14fix link on std::result::ResultVladimir Rutsky-3/+2
The link is broken here: <https://doc.rust-lang.org/std/io/#types>. Looks like crate documentation generator uses only first paragraph of the module documentation and so doesn't resolve the link defined below.
2015-09-14Auto merge of #28256 - petrochenkov:conv, r=alexcrichtonbors-1/+5
This patch transforms functions of the form ``` fn f<Generic: AsRef<Concrete>>(arg: Generic) { let arg: &Concrete = arg.as_ref(); // Code using arg } ``` to the next form: ``` #[inline] fn f<Generic: AsRef<Concrete>>(arg: Generic) { fn f_inner(arg: &Concrete) { // Code using arg } f_inner(arg.as_ref()); } ``` Therefore, most of the code is concrete and not duplicated during monomorphisation (unless inlined) and only the tiny bit of conversion code is duplicated. This method was mentioned by @aturon in the Conversion Traits RFC (https://github.com/rust-lang/rfcs/blame/master/text/0529-conversion-traits.md#L249) and similar techniques are not uncommon in C++ template libraries. This patch goes to the extremes and applies the transformation even to smaller functions<sup>1</sup> for purity of the experiment. *Some of them can be rolled back* if considered too ridiculous. <sup>1</sup> However who knows how small are these functions are after inlining and everything. The functions in question are mostly `fs`/`os` functions and not used especially often with variety of argument types, so the code size reduction is rather small (but consistent). Here are the sizes of stage2 artifacts before and after the patch: https://gist.github.com/petrochenkov/e76a6b280f382da13c5d https://gist.github.com/petrochenkov/6cc28727d5256dbdfed0 Note: All the `inner` functions are concrete and unavailable for cross-crate inlining, some of them may need `#[inline]` annotations in the future. r? @aturon
2015-09-09Reduce code bloat from conversion traits in function parametersVadim Petrochenkov-1/+5
2015-09-08some more clippy-based improvementsAndre Bogus-3/+3
2015-08-30Auto merge of #27588 - cesarb:read_all, r=alexcrichtonbors-0/+9
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980). Tracking issue: https://github.com/rust-lang/rust/issues/27585
2015-08-28Add issue number to read_exact unstable declarationsCesar Eduardo Barros-1/+1
2015-08-24Implement read_exact for the Read traitCesar Eduardo Barros-0/+9
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980).
2015-08-19Improve std::io::ErrorKindSteve Klabnik-0/+3
Hopefully make this distinction a little more clear. Fixes #27637
2015-08-15std: Add issues to all unstable featuresAlex Crichton-1/+2
2015-07-28std: Stabilize a number of small APIsAlex Crichton-9/+6
The following APIs were all marked with a `#[stable]` tag: * process::Child::id * error::Error::is * error::Error::downcast * error::Error::downcast_ref * error::Error::downcast_mut * io::Error::get_ref * io::Error::get_mut * io::Error::into_inner * hash::Hash::hash_slice * hash::Hasher::write_{i,u}{8,16,32,64,size}
2015-07-10Add more std::io documentation.Steve Klabnik-3/+29
This round: io::Result and the free functions.