rust/tests/ui/duplicate/dupe-symbols-4.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
281 B
Rust
Raw Normal View History

// build-fail
//
2015-03-20 13:09:00 +00:00
// error-pattern: symbol `fail` is already defined
#![crate_type="rlib"]
#![allow(warnings)]
pub trait A {
fn fail(self);
}
struct B;
struct C;
impl A for B {
#[no_mangle]
fn fail(self) {}
}
impl A for C {
#[no_mangle]
fn fail(self) {}
}