diff --git a/CHANGELOG.md b/CHANGELOG.md index 9063a22a3c..232b2dbd2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +1.3.2 (2020-01-09) +================== +This is a small maintenance release with some house cleaning and bug fixes. + +Bug fixes: + +* [BUG #633](https://github.com/rust-lang/regex/pull/633): + Squash deprecation warnings for the `std::error::Error::description` method. + + 1.3.1 (2019-09-04) ================== This is a maintenance release with no changes in order to try to work-around diff --git a/regex-syntax/src/ast/mod.rs b/regex-syntax/src/ast/mod.rs index 6cd0bc48f4..35fd051f18 100644 --- a/regex-syntax/src/ast/mod.rs +++ b/regex-syntax/src/ast/mod.rs @@ -176,6 +176,8 @@ pub enum ErrorKind { } impl error::Error for Error { + // TODO: Remove this method entirely on the next breaking semver release. + #[allow(deprecated)] fn description(&self) -> &str { use self::ErrorKind::*; match self.kind { diff --git a/regex-syntax/src/error.rs b/regex-syntax/src/error.rs index 464148e3dd..93c2b0dd93 100644 --- a/regex-syntax/src/error.rs +++ b/regex-syntax/src/error.rs @@ -40,6 +40,8 @@ impl From for Error { } impl error::Error for Error { + // TODO: Remove this method entirely on the next breaking semver release. + #[allow(deprecated)] fn description(&self) -> &str { match *self { Error::Parse(ref x) => x.description(), diff --git a/regex-syntax/src/hir/mod.rs b/regex-syntax/src/hir/mod.rs index ee08e83dba..67411fcdc3 100644 --- a/regex-syntax/src/hir/mod.rs +++ b/regex-syntax/src/hir/mod.rs @@ -91,6 +91,8 @@ pub enum ErrorKind { } impl ErrorKind { + // TODO: Remove this method entirely on the next breaking semver release. + #[allow(deprecated)] fn description(&self) -> &str { use self::ErrorKind::*; match *self { @@ -113,6 +115,8 @@ impl ErrorKind { } impl error::Error for Error { + // TODO: Remove this method entirely on the next breaking semver release. + #[allow(deprecated)] fn description(&self) -> &str { self.kind.description() } @@ -126,6 +130,8 @@ impl fmt::Display for Error { impl fmt::Display for ErrorKind { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + // TODO: Remove this on the next breaking semver release. + #[allow(deprecated)] f.write_str(self.description()) } } diff --git a/src/error.rs b/src/error.rs index eb7f121a83..1c32c85b99 100644 --- a/src/error.rs +++ b/src/error.rs @@ -19,6 +19,8 @@ pub enum Error { } impl ::std::error::Error for Error { + // TODO: Remove this method entirely on the next breaking semver release. + #[allow(deprecated)] fn description(&self) -> &str { match *self { Error::Syntax(ref err) => err,