about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhi-rustin <rustin.liu@gmail.com>2023-07-02 12:07:25 +0800
committerhi-rustin <rustin.liu@gmail.com>2023-07-02 12:07:25 +0800
commit7cab8f786280ab249d8e0711d085d853aa41629f (patch)
tree201941c39149a7a9675cc444934f7d8bbbbe7248
parent878eff12074621e37bef8dabc85c5a8d312fd400 (diff)
downloadrust-7cab8f786280ab249d8e0711d085d853aa41629f.tar.gz
rust-7cab8f786280ab249d8e0711d085d853aa41629f.zip
Fix broken tests
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
-rw-r--r--src/bootstrap/config/tests.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bootstrap/config/tests.rs b/src/bootstrap/config/tests.rs
index 6ec24530af2..732df54cdac 100644
--- a/src/bootstrap/config/tests.rs
+++ b/src/bootstrap/config/tests.rs
@@ -181,8 +181,6 @@ fn profile_user_dist() {
 
 #[test]
 fn rust_optimize() {
-    let parse = |s| Config::parse_inner(&["check".to_owned()], |&_| toml::from_str(s).unwrap());
-
     assert_eq!(parse("").rust_optimize.is_release(), true);
     assert_eq!(parse("rust.optimize = false").rust_optimize.is_release(), false);
     assert_eq!(parse("rust.optimize = true").rust_optimize.is_release(), true);
@@ -193,7 +191,5 @@ fn rust_optimize() {
 #[test]
 #[should_panic]
 fn invalid_rust_optimize() {
-    Config::parse_inner(&["check".to_owned()], |&_| {
-        toml::from_str("rust.optimize = \"a\"").unwrap()
-    });
+    parse("rust.optimize = \"a\"");
 }