]> git.lizzy.rs Git - rust.git/commitdiff
Convert conservative_impl_trait.rs to compile-pass
authorJonas Schievink <jonasschievink@gmail.com>
Thu, 4 Oct 2018 12:57:31 +0000 (14:57 +0200)
committerJonas Schievink <jonasschievink@gmail.com>
Thu, 4 Oct 2018 12:57:31 +0000 (14:57 +0200)
src/test/run-pass/traits/conservative_impl_trait.rs [deleted file]
src/test/run-pass/traits/conservative_impl_trait.stderr [deleted file]
src/test/ui/traits/conservative_impl_trait.rs [new file with mode: 0644]

diff --git a/src/test/run-pass/traits/conservative_impl_trait.rs b/src/test/run-pass/traits/conservative_impl_trait.rs
deleted file mode 100644 (file)
index b6abeb9..0000000
+++ /dev/null
@@ -1,18 +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.
-
-// run-pass
-// #39665
-
-fn batches(n: &u32) -> impl Iterator<Item=&u32> {
-    std::iter::once(n)
-}
-
-fn main() {}
diff --git a/src/test/run-pass/traits/conservative_impl_trait.stderr b/src/test/run-pass/traits/conservative_impl_trait.stderr
deleted file mode 100644 (file)
index 26c29bf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-warning: function is never used: `batches`
-  --> $DIR/conservative_impl_trait.rs:14:1
-   |
-LL | fn batches(n: &u32) -> impl Iterator<Item=&u32> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: #[warn(dead_code)] on by default
-
diff --git a/src/test/ui/traits/conservative_impl_trait.rs b/src/test/ui/traits/conservative_impl_trait.rs
new file mode 100644 (file)
index 0000000..3f119af
--- /dev/null
@@ -0,0 +1,18 @@
+// 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.
+
+// compile-pass
+// #39665
+
+fn batches(n: &u32) -> impl Iterator<Item=&u32> {
+    std::iter::once(n)
+}
+
+fn main() {}