Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
56a5f31
Fixed GDB pretty printer to work on enums correctly
cactorium Jan 5, 2015
d009a76
Fixed GDB pretty printer more
cactorium Jan 5, 2015
3d3670b
Added fix to LLDB formatter
cactorium Jan 5, 2015
22cae7e
Pylinted and slightly better commented
cactorium Jan 5, 2015
537285e
Fix -Z no-analysis
sanxiyn Jan 5, 2015
7e42338
Added two tests for pretty printing optimized enums
cactorium Jan 5, 2015
87eebd1
Fixed tests
cactorium Jan 5, 2015
d338572
Fixed tests
cactorium Jan 5, 2015
351e6b7
Implement TTY::get_winsize for Windows
retep998 Jan 6, 2015
b683e87
Add check to ensure trait bounds are only placed o
jroesch Jan 6, 2015
72e0800
iOS: CString fallout
vhbit Jan 6, 2015
9d0b3c9
rustc: Turn off multiple versions of crate warning
alexcrichton Jan 6, 2015
ec133fe
cleanup: use short AT notation (`Ty::Item` instead of `<Ty as Trait>:…
Jan 6, 2015
6539cb4
auto merge of #20618 : alexcrichton/rust/less-warn, r=brson
bors Jan 6, 2015
f67b81e
Stabilize std::thread
aturon Jan 5, 2015
570bda6
update zsh rust completions
scialex Jan 6, 2015
7de9a73
Stabilize std::error
aturon Jan 6, 2015
68cb170
std: prevent `CreateProcess()` race on Windows
klutzy Jan 6, 2015
134eb0e
Tuning pthread_key_t type
mneumann Jan 6, 2015
2486d93
Fix ICE that @steveklabnik encountered in rust-ice. The problems turn…
nikomatsakis Jan 6, 2015
ea6f65c
auto merge of #20633 : vhbit/rust/ios-cstring, r=brson
bors Jan 6, 2015
25eada1
[breaking change] Revert Entry behaviour to take keys by value.
dylanede Jan 6, 2015
169fbed
std: Revert stability of Entry-based APIs
alexcrichton Jan 6, 2015
abcbe27
syntax/rustc: implement isize/usize
emberian Dec 6, 2014
5037097
Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`
Jan 6, 2015
ba2a77b
stabilisation
Jan 6, 2015
91ba66f
Review changes
Jan 6, 2015
918255e
Impls using the new scheme for slicing
Dec 31, 2014
f7ff37e
Replace full slice notation with index calls
Jan 2, 2015
5a4ca31
test fallout from isize/usize
emberian Dec 6, 2014
e970db3
Remove old slicing hacks and make new slicing work
Jan 3, 2015
77ed497
Tests
Jan 3, 2015
480374a
Only use built-in indexing for uint indexes
Jan 4, 2015
791f545
Pretty print empty structs properly
Jan 4, 2015
2404232
Remove the unneeded Sized bound on TypeId creation
reem Jan 6, 2015
3ed7f06
Fix fallout in libs. For the most part I just tagged impls as `#[old_…
nikomatsakis Jan 5, 2015
2375a79
Implement impl reachability rules. This is a [breaking-change]. Type
nikomatsakis Jan 5, 2015
d913239
Fix fallout in tests.
nikomatsakis Jan 5, 2015
d31105e
Add new tests covering various cases.
nikomatsakis Jan 5, 2015
44440e5
core: split into fmt::Show and fmt::String
seanmonstar Dec 20, 2014
caca9b2
Fallout from stabilization
aturon Jan 6, 2015
0c7f7a5
fallout
Jan 4, 2015
1afe8a4
rollup merge of #20562: nick29581/arrays-3
alexcrichton Jan 6, 2015
5f27b50
rollup merge of #20609: cmr/mem
alexcrichton Jan 6, 2015
9f07d05
markers -> marker
Jan 6, 2015
5c3ddcb
rollup merge of #20481: seanmonstar/fmt-show-string
alexcrichton Jan 6, 2015
e2f97f5
Register new snapshots
alexcrichton Jan 6, 2015
d85c017
Cleanup and followup to PR #17830: parsing changes
pczarn Jan 2, 2015
f358dbf
rollup merge of #20557: cactorium/prettyprinters
alexcrichton Jan 6, 2015
cc20935
rollup merge of #20570: sanxiyn/no-analysis
alexcrichton Jan 6, 2015
6ccfd3f
rollup merge of #20612: retep998/winsize
alexcrichton Jan 6, 2015
0f1bd6f
rollup merge of #20623: jroesch/reject-non-param-bounds
alexcrichton Jan 6, 2015
e0f546a
rollup merge of #20643: scialex/update-zsh
alexcrichton Jan 6, 2015
0b3b957
rollup merge of #20645: nikomatsakis/rustbook-ice
alexcrichton Jan 6, 2015
acc5d79
rollup merge of #20647: aturon/stab-2-error
alexcrichton Jan 6, 2015
ed61bd8
rollup merge of #20652: vhbit/thread-key-type
alexcrichton Jan 6, 2015
e3f047c
rollup merge of #20653: alexcrichton/entry-unstable
alexcrichton Jan 6, 2015
3892dd1
rollup merge of #20593: nikomatsakis/unused-tps-in-impl
alexcrichton Jan 6, 2015
771fe90
rollup merge of #20607: nrc/kinds
alexcrichton Jan 6, 2015
0631b46
rollup merge of #19430: pczarn/interp_tt-cleanup
alexcrichton Jan 6, 2015
36f5d12
rollup merge of #20615: aturon/stab-2-thread
alexcrichton Jan 6, 2015
0393a16
rollup merge of #20650: klutzy/omg-windows-error-mode
alexcrichton Jan 6, 2015
7840499
rollup merge of #20662: reem/unsized-typeid
alexcrichton Jan 6, 2015
34a63d3
rollup merge of #20656: japaric/at-clean
alexcrichton Jan 6, 2015
26cd8ea
rollup merge of #20563: cmr/macro-input-future-proofing
alexcrichton Jan 6, 2015
56a9e2f
Test fixes and rebase conflicts
alexcrichton Jan 6, 2015
24ccb34
Revert "Remove the unneeded Sized bound on TypeId creation"
alexcrichton Jan 7, 2015
a640008
More test fixes
alexcrichton Jan 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Stabilize std::error
This commit is a first past stabilization of `std::error`:

* The module is stable.
* The `FromError` trait and impls are stable
* The `Error` trait itself is left unstable, pending current APIs and
  possible revisions during the alpha cycle.
  • Loading branch information
aturon committed Jan 6, 2015
commit 7de9a73ab5891b190b3f49004fa75599a94c70ad
8 changes: 8 additions & 0 deletions src/libstd/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,15 @@
//! }
//! ```

#![stable]

use prelude::v1::*;

use str::Utf8Error;
use string::{FromUtf8Error, FromUtf16Error};

/// Base functionality for all errors in Rust.
#[unstable = "the exact API of this trait may change"]
pub trait Error: Send {
/// A short description of the error; usually a static string.
fn description(&self) -> &str;
Expand All @@ -96,18 +99,21 @@ pub trait Error: Send {
}

/// A trait for types that can be converted from a given error type `E`.
#[stable]
pub trait FromError<E> {
/// Perform the conversion.
fn from_error(err: E) -> Self;
}

// Any type is convertable from itself
#[stable]
impl<E> FromError<E> for E {
fn from_error(err: E) -> E {
err
}
}

#[stable]
impl Error for Utf8Error {
fn description(&self) -> &str {
match *self {
Expand All @@ -119,11 +125,13 @@ impl Error for Utf8Error {
fn detail(&self) -> Option<String> { Some(self.to_string()) }
}

#[stable]
impl Error for FromUtf8Error {
fn description(&self) -> &str { "invalid utf-8" }
fn detail(&self) -> Option<String> { Some(self.to_string()) }
}

#[stable]
impl Error for FromUtf16Error {
fn description(&self) -> &str { "invalid utf-16" }
}