Skip to content

Commit

Permalink
changed stability annotations
Browse files Browse the repository at this point in the history
Changed stability annotations for the new Error and Display impls
for std::ffi::FromBytesWithNulError as they aren't subject to
stability the same way.
  • Loading branch information
chordowl committed Feb 21, 2017
1 parent 6a10e63 commit 48331ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/ffi/c_str.rs
Expand Up @@ -455,14 +455,14 @@ impl From<NulError> for io::Error {
}
}

#[unstable(feature = "frombyteswithnulerror_impls", reason = "recently added", issue = "39925")]
#[stable(feature = "frombyteswithnulerror_impls", since = "1.17.0")]
impl Error for FromBytesWithNulError {
fn description(&self) -> &str {
"data provided is not null terminated or contains an interior nul byte"
}
}

#[unstable(feature = "frombyteswithnulerror_impls", reason = "recently added", issue = "39925")]
#[stable(feature = "frombyteswithnulerror_impls", since = "1.17.0")]
impl fmt::Display for FromBytesWithNulError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.description().fmt(f)
Expand Down

0 comments on commit 48331ef

Please sign in to comment.