about summary refs log tree commit diff
path: root/src/libstd/error.rs
AgeCommit message (Collapse)AuthorLines
2018-03-15replace `convert::Infallible` with `!`Andrew Cann-9/+0
2018-03-14change never_type stabilisation versionAndrew Cann-1/+1
2018-03-14Fix version numberAndrew Cann-1/+1
2018-03-14stabilise feature(never_type)Andrew Cann-1/+1
Replace feature(never_type) with feature(exhaustive_patterns). feature(exhaustive_patterns) only covers the pattern-exhaustives checks that used to be covered by feature(never_type)
2017-12-12Rename never_type_impls gate to never_typeAndrew Cann-1/+1
2017-09-30Merge remote-tracking branch 'upstream/master'Nikolai Vazquez-0/+8
2017-09-29Auto merge of #44174 - jimmycuadra:try-from-infallible, r=sfacklerbors-0/+8
Add blanket TryFrom impl when From is implemented. Adds `impl<T, U> TryFrom<T> for U where U: From<T>`. Removes `impl<'a, T> TryFrom<&'a str> for T where T: FromStr` (originally added in #40281) due to overlapping impls caused by the new blanket impl. This removal is to be discussed further on the tracking issue for TryFrom. Refs #33417. /cc @sfackler, @scottmcm (thank you for the help!), and @aturon
2017-09-29Implement Error trait for TryFromSliceErrorNikolai Vazquez-0/+8
2017-09-23Simplify implementation of Display and Error for convert::Infallible.Jimmy Cuadra-1/+2
2017-09-21impl std::error::Error for convert::Infallible.Jimmy Cuadra-0/+7
2017-09-10Add Cow<str> -> Box<Error> impls.Clar Charr-0/+15
2017-08-02Fixed errors in libstd.Isaac van Bakel-1/+1
2017-07-10Correct some stability attributesOliver Middleton-1/+1
These show up in rustdoc so need to be correct.
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-2/+2
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-06-20Rollup merge of #42271 - tinaun:charfromstr, r=alexcrichtonCorey Farwell-0/+8
add `FromStr` Impl for `char` fixes #24939. is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?
2017-06-20added `FromStr` Impl for `char`tinaun-0/+8
2017-06-15implement Error trait for error structs added in allocator API.Felix S. Klock II-0/+19
2017-05-20Correct some stability versionsOliver Middleton-3/+3
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-04-18Fix a few stability attributesOliver Middleton-1/+1
These show up in rustdoc so need to be correct.
2017-03-15Implement Error for !.Clar Charr-0/+5
2016-11-25Follow our own recommendations in the examplesVickenty Fesunov-2/+2
Remove exclamation marks from the the example error descriptions: > The description [...] should not contain newlines or sentence-ending punctuation
2016-10-21Fix a few links in the docsOliver Middleton-1/+3
2016-10-15Fixed typoNabeel Omer-1/+1
2016-10-15Corrected broken markdown linkNabeel Omer-1/+1
2016-10-15Updated the docs for Error::descriptionNabeel Omer-3/+5
2016-10-12Deprecate `Reflect`Nick Cameron-2/+1
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-10-04Rollup merge of #36928 - GuillaumeGomez:error_urls, r=steveklabnikManish Goregaokar-4/+8
Add missing urls for error module r? @steveklabnik
2016-10-03std: Stabilize and deprecate APIs for 1.13Alex Crichton-4/+4
This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` * `DefaultHasher` * `DefaultHasher::new` * `DefaultHasher::default` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-10-03Add missing urls for error moduleGuillaume Gomez-4/+8
2016-08-29Implement TryFrom<u32> for charSimon Sapin-0/+7
For symmetry with From<char> for u32.
2016-08-26Replace unnecessary uses of `TraitObject` with castsAndrew Paseltiner-18/+4
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-4/+2
2016-08-08Implement `RefCell::{try_borrow, try_borrow_mut}`Andrew Paseltiner-0/+15
2016-07-10Add examples for std::Error moduleGuillaume Gomez-0/+70
2016-05-25Implement Error trait for fmt::Error typeGuillaume Gomez-0/+7
2016-05-07Implement RFC 1542Steven Fackler-0/+7
cc #33417
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-3/+8
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-01-23Impl Error for Box<T: Error>Guillaume Gomez-0/+11
2016-01-22Simplify return for error::Error impl for string::ParseErrorDirk Gadsden-1/+1
2016-01-22Implement error::Error and fmt::Display for string::ParseErrorDirk Gadsden-0/+7
Fixes #31106.
2016-01-13Add an impl for Box<Error> from &str.Michael Sproul-0/+7
2015-12-22Add an impl for Box<Error> from String.Michael Sproul-0/+9
Closes #30156.
2015-08-15std: Add issues to all unstable featuresAlex Crichton-1/+2
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-2/+2
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.
2015-07-28std: Stabilize a number of small APIsAlex Crichton-9/+93
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-06-17std: Hide some internal functions more aggressivelyAlex Crichton-1/+1
* Add `#[doc(hidden)]` * Rename away from `Error::description`
2015-06-17More test fixes and fallout of stability changesAlex Crichton-2/+2
2015-06-17core: Split apart the global `core` featureAlex Crichton-1/+1
This commit shards the broad `core` feature of the libcore library into finer grained features. This split groups together similar APIs and enables tracking each API separately, giving a better sense of where each feature is within the stabilization process. A few minor APIs were deprecated along the way: * Iterator::reverse_in_place * marker::NoCopy
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-05-01std: Don't use a wrapper for the float error typeAlex Crichton-1/+1
Ensures that the same error type is propagated throughout. Unnecessary leakage of the internals is prevented through the usage of stability attributes. Closes #24748