mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
18 lines
214 B
Rust
18 lines
214 B
Rust
// run-pass
|
|
|
|
trait Foo {
|
|
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());
|
|
}
|