mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
25 lines
283 B
Rust
25 lines
283 B
Rust
//@ build-fail
|
|
|
|
//
|
|
//@ 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) {}
|
|
}
|