2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2024-02-07 10:42:01 +08:00
|
|
|
trait Foo { //~ WARN trait `Foo` is never used
|
2014-04-22 12:20:08 +01:00
|
|
|
fn new() -> bool { false }
|
2015-02-12 10:29:52 -05:00
|
|
|
fn dummy(&self) { }
|
2014-04-22 12:20:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
trait Bar {
|
|
|
|
fn new(&self) -> bool { true }
|
|
|
|
}
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
impl Bar for isize {}
|
|
|
|
impl Foo for isize {}
|
2014-04-22 12:20:08 +01:00
|
|
|
|
|
|
|
fn main() {
|
2015-01-25 22:05:03 +01:00
|
|
|
assert!(1.new());
|
2014-05-22 16:57:53 -07:00
|
|
|
}
|