]> git.lizzy.rs Git - rust.git/commitdiff
rename `equality-universal` to a more extensible naming scheme
authorNiko Matsakis <niko@alum.mit.edu>
Mon, 13 Nov 2017 19:11:10 +0000 (14:11 -0500)
committerChristopher Vittal <christopher.vittal@gmail.com>
Wed, 15 Nov 2017 20:46:01 +0000 (15:46 -0500)
src/test/run-pass/impl-trait/equality-universal.rs [deleted file]
src/test/run-pass/impl-trait/universal_in_impl_trait_in_parameters.rs [new file with mode: 0644]

diff --git a/src/test/run-pass/impl-trait/equality-universal.rs b/src/test/run-pass/impl-trait/equality-universal.rs
deleted file mode 100644 (file)
index ccf24b7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(universal_impl_trait)]
-use std::fmt::Display;
-
-fn check_display_eq(iter: impl IntoIterator<Item = impl Display>) {
-    let mut collected = String::new();
-    for it in iter {
-        let disp = format!("{} ", it);
-        collected.push_str(&disp);
-    }
-    assert_eq!("0 3 27 823 4891 1 0", collected.trim());
-}
-
-fn main() {
-    let i32_list = [0i32, 3, 27, 823, 4891, 1, 0];
-    let i32_list_vec = vec![0i32, 3, 27, 823, 4891, 1, 0];
-    let u32_list = [0u32, 3, 27, 823, 4891, 1, 0];
-    let u32_list_vec = vec![0u32, 3, 27, 823, 4891, 1, 0];
-    let u16_list = [0u16, 3, 27, 823, 4891, 1, 0];
-    let str_list = ["0", "3", "27", "823", "4891", "1", "0"];
-    let str_list_vec = vec!["0", "3", "27", "823", "4891", "1", "0"];
-
-    check_display_eq(&i32_list);
-    check_display_eq(i32_list_vec);
-    check_display_eq(&u32_list);
-    check_display_eq(u32_list_vec);
-    check_display_eq(&u16_list);
-    check_display_eq(&str_list);
-    check_display_eq(str_list_vec);
-}
diff --git a/src/test/run-pass/impl-trait/universal_in_impl_trait_in_parameters.rs b/src/test/run-pass/impl-trait/universal_in_impl_trait_in_parameters.rs
new file mode 100644 (file)
index 0000000..ccf24b7
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(universal_impl_trait)]
+use std::fmt::Display;
+
+fn check_display_eq(iter: impl IntoIterator<Item = impl Display>) {
+    let mut collected = String::new();
+    for it in iter {
+        let disp = format!("{} ", it);
+        collected.push_str(&disp);
+    }
+    assert_eq!("0 3 27 823 4891 1 0", collected.trim());
+}
+
+fn main() {
+    let i32_list = [0i32, 3, 27, 823, 4891, 1, 0];
+    let i32_list_vec = vec![0i32, 3, 27, 823, 4891, 1, 0];
+    let u32_list = [0u32, 3, 27, 823, 4891, 1, 0];
+    let u32_list_vec = vec![0u32, 3, 27, 823, 4891, 1, 0];
+    let u16_list = [0u16, 3, 27, 823, 4891, 1, 0];
+    let str_list = ["0", "3", "27", "823", "4891", "1", "0"];
+    let str_list_vec = vec!["0", "3", "27", "823", "4891", "1", "0"];
+
+    check_display_eq(&i32_list);
+    check_display_eq(i32_list_vec);
+    check_display_eq(&u32_list);
+    check_display_eq(u32_list_vec);
+    check_display_eq(&u16_list);
+    check_display_eq(&str_list);
+    check_display_eq(str_list_vec);
+}