From 9d500e76a0e1644c93b3869588f979e4440e74d6 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sun, 25 Feb 2018 08:21:55 +0100 Subject: [PATCH] Update to rustc_test 0.3, unbreak tests on nightly-2018-02-25 Version 0.2 of the crates.io package `rustc_test` uses `test` as its rustc crate name, shadowing the `test` crate from the standard library. This made up subject to breaking changes to its private APIs: https://travis-ci.org/SimonSapin/run-nightly/builds/345808272#L549 --- Cargo.toml | 2 +- idna/Cargo.toml | 2 +- idna/tests/tests.rs | 2 +- idna/tests/uts46.rs | 2 +- tests/data.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d33951a93..f39f35e0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ harness = false test = false [dev-dependencies] -rustc-test = "0.2" +rustc-test = "0.3" rustc-serialize = "0.3" serde_json = ">=0.6.1, <0.9" diff --git a/idna/Cargo.toml b/idna/Cargo.toml index 8405be06d..4fc40764a 100644 --- a/idna/Cargo.toml +++ b/idna/Cargo.toml @@ -18,7 +18,7 @@ harness = false name = "unit" [dev-dependencies] -rustc-test = "0.2" +rustc-test = "0.3" rustc-serialize = "0.3" [dependencies] diff --git a/idna/tests/tests.rs b/idna/tests/tests.rs index 8ca218595..808ad6ba8 100644 --- a/idna/tests/tests.rs +++ b/idna/tests/tests.rs @@ -1,6 +1,6 @@ extern crate idna; extern crate rustc_serialize; -extern crate test; +extern crate rustc_test as test; mod punycode; mod uts46; diff --git a/idna/tests/uts46.rs b/idna/tests/uts46.rs index ddc8af989..59ec1cd76 100644 --- a/idna/tests/uts46.rs +++ b/idna/tests/uts46.rs @@ -108,7 +108,7 @@ fn unescape(input: &str) -> String { let c2 = chars.next().unwrap().to_digit(16).unwrap(); let c3 = chars.next().unwrap().to_digit(16).unwrap(); let c4 = chars.next().unwrap().to_digit(16).unwrap(); - match char::from_u32((((c1 * 16 + c2) * 16 + c3) * 16 + c4)) + match char::from_u32(((c1 * 16 + c2) * 16 + c3) * 16 + c4) { Some(c) => output.push(c), None => { output.push_str(&format!("\\u{:X}{:X}{:X}{:X}",c1,c2,c3,c4)); } diff --git a/tests/data.rs b/tests/data.rs index 8885f6496..e9203b1b0 100644 --- a/tests/data.rs +++ b/tests/data.rs @@ -9,7 +9,7 @@ //! Data-driven tests extern crate rustc_serialize; -extern crate test; +extern crate rustc_test as test; extern crate url; use rustc_serialize::json::{self, Json};