Move 'coherence-overlapping-inherent-impl-trait' test to ui

This commit is contained in:
topecongiro 2017-04-04 21:08:56 +09:00
parent 09f42ee333
commit db60b0b374
2 changed files with 11 additions and 1 deletions

View file

@ -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() { }

View file

@ -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