From 1b016589133e48d34dd5ae1b440581ded4cb4cdb Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 8 May 2019 12:12:14 -0700 Subject: Migrate to 2018 edition. --- test-suite/Cargo.toml | 1 + test-suite/tests/macros.rs | 4 ++++ test-suite/tests/serde.rs | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'test-suite') diff --git a/test-suite/Cargo.toml b/test-suite/Cargo.toml index 10ffbcb..fa81741 100644 --- a/test-suite/Cargo.toml +++ b/test-suite/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.0" authors = ["Alex Crichton "] build = "build.rs" publish = false +edition = "2018" [build-dependencies] rustc_version = "0.2" diff --git a/test-suite/tests/macros.rs b/test-suite/tests/macros.rs index 6b77c81..db94549 100644 --- a/test-suite/tests/macros.rs +++ b/test-suite/tests/macros.rs @@ -7,6 +7,8 @@ use std::f64; macro_rules! table { ($($key:expr => $value:expr,)*) => {{ + // https://github.com/rust-lang/rust/issues/60643 + #[allow(unused_mut)] let mut table = toml::value::Table::new(); $( table.insert($key.to_string(), $value.into()); @@ -17,6 +19,8 @@ macro_rules! table { macro_rules! array { ($($element:expr,)*) => {{ + // https://github.com/rust-lang/rust/issues/60643 + #[allow(unused_mut)] let mut array = toml::value::Array::new(); $( array.push($element.into()); diff --git a/test-suite/tests/serde.rs b/test-suite/tests/serde.rs index 9bbf7e0..c72bfc6 100644 --- a/test-suite/tests/serde.rs +++ b/test-suite/tests/serde.rs @@ -130,7 +130,7 @@ fn application_decode_error() { struct Range10(usize); impl<'de> Deserialize<'de> for Range10 { fn deserialize>(d: D) -> Result { - let x: usize = try!(Deserialize::deserialize(d)); + let x: usize = Deserialize::deserialize(d)?; if x > 10 { Err(serde::de::Error::custom("more than 10")) } else { -- cgit v1.2.3