From c0e2b520335413a216ca654913a1c242e6edb413 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Wed, 12 Dec 2018 07:36:39 +1300 Subject: [PATCH 1/4] Use associated function syntax for `Debug` and `Display` backtrace impl Rust was reporting a compilation error saying it was ambiguous which `fmt` method to call. --- src/backtrace/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backtrace/mod.rs b/src/backtrace/mod.rs index 58f0477..fd3ebc2 100644 --- a/src/backtrace/mod.rs +++ b/src/backtrace/mod.rs @@ -129,7 +129,7 @@ with_backtrace! { impl Debug for Backtrace { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(bt) = self.internal.as_backtrace() { - bt.fmt(f) + Debug::fmt(bt, f) } else { Ok(()) } } } @@ -137,7 +137,7 @@ with_backtrace! { impl Display for Backtrace { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(bt) = self.internal.as_backtrace() { - bt.fmt(f) + Display::fmt(bt, f) } else { Ok(()) } } } From 8c3d6a1dc60bcd0cc426ae09f7345636bbbf47f8 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Wed, 12 Dec 2018 22:00:23 +1300 Subject: [PATCH 2/4] Use `Debug` format for backtrace in `Display` impl. Issue #279 --- src/backtrace/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backtrace/mod.rs b/src/backtrace/mod.rs index fd3ebc2..2d3ab8d 100644 --- a/src/backtrace/mod.rs +++ b/src/backtrace/mod.rs @@ -137,7 +137,7 @@ with_backtrace! { impl Display for Backtrace { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(bt) = self.internal.as_backtrace() { - Display::fmt(bt, f) + Debug::fmt(bt, f) } else { Ok(()) } } } From 6ffb645a2e9f63b8ae206783cf15f2b2f6ef66c9 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Wed, 12 Dec 2018 22:08:04 +1300 Subject: [PATCH 3/4] Lock `backtrace` crate to 0.3.9. The current latest (0.3.11)` is not compatible with Rust 1.18.0. Pending --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6eb0a77..d4b349a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ path = "./failure_derive" [dependencies.backtrace] optional = true -version = "0.3.3" +version = "=0.3.9" [workspace] members = [".", "failure_derive"] From 16a4e97358338c8e5bb795f3b9b28d1a72979e9f Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Fri, 14 Dec 2018 07:04:30 +1300 Subject: [PATCH 4/4] Raise minimum supported Rust version to 1.25.0. The `backtrace` crate has this as a minimum required version since 0.3.13. --- .travis.yml | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61d8965..b021b9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - 1.18.0 + - 1.25.0 - stable - beta - nightly diff --git a/Cargo.toml b/Cargo.toml index d4b349a..e3f96a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ path = "./failure_derive" [dependencies.backtrace] optional = true -version = "=0.3.9" +version = "0.3.13" [workspace] members = [".", "failure_derive"] diff --git a/README.md b/README.md index 2f22832..6d6321a 100644 --- a/README.md +++ b/README.md @@ -100,8 +100,8 @@ pub fn read_toolchains(path: PathBuf) -> Result ## Requirements Both failure and failure_derive are intended to compile on all stable versions -of Rust newer than 1.18.0, as well as the latest beta and the latest nightly. -If either crate fails to compile on any version newer than 1.18.0, please open +of Rust newer than 1.25.0, as well as the latest beta and the latest nightly. +If either crate fails to compile on any version newer than 1.25.0, please open an issue. failure is **no_std** compatible, though some aspects of it (primarily the