+++ /dev/null
-// 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() { }
--- /dev/null
+// 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() { }
--- /dev/null
+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
+