]> git.lizzy.rs Git - rust.git/commitdiff
Move 'coherence-overlapping-inherent-impl-trait' test to ui
authortopecongiro <seuchida@gmail.com>
Tue, 4 Apr 2017 12:08:56 +0000 (21:08 +0900)
committertopecongiro <seuchida@gmail.com>
Tue, 4 Apr 2017 12:08:56 +0000 (21:08 +0900)
src/test/compile-fail/coherence-overlapping-inherent-impl-trait.rs [deleted file]
src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs [new file with mode: 0644]
src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr [new file with mode: 0644]

diff --git a/src/test/compile-fail/coherence-overlapping-inherent-impl-trait.rs b/src/test/compile-fail/coherence-overlapping-inherent-impl-trait.rs
deleted file mode 100644 (file)
index 158d360..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 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.
-
-#![allow(dead_code)]
-
-trait C {}
-impl C { fn f() {} } //~ ERROR duplicate definitions with name `f`
-impl C { fn f() {} }
-fn main() { }
diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.rs
new file mode 100644 (file)
index 0000000..a72ad03
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2016 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.
+
+#![allow(dead_code)]
+
+trait C {}
+impl C { fn f() {} }
+impl C { fn f() {} }
+fn main() { }
diff --git a/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr b/src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr
new file mode 100644 (file)
index 0000000..7f1ab92
--- /dev/null
@@ -0,0 +1,10 @@
+error[E0592]: duplicate definitions with name `f`
+  --> $DIR/coherence-overlapping-inherent-impl-trait.rs:14:10
+   |
+14 | impl C { fn f() {} }
+   |          ^^^^^^^^^ duplicate definitions for `f`
+15 | impl C { fn f() {} }
+   |          --------- other definition for `f`
+
+error: aborting due to previous error
+