mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
17 lines
250 B
Rust
17 lines
250 B
Rust
//@ run-pass
|
|
|
|
trait Foo { //~ WARN trait `Foo` is never used
|
|
fn new() -> bool { false }
|
|
fn dummy(&self) { }
|
|
}
|
|
|
|
trait Bar {
|
|
fn new(&self) -> bool { true }
|
|
}
|
|
|
|
impl Bar for isize {}
|
|
impl Foo for isize {}
|
|
|
|
fn main() {
|
|
assert!(1.new());
|
|
}
|