about summary refs log tree commit diff
path: root/tests/ui/methods/trait-method-self-param-error-7575.rs
blob: 9793d43cc24fc2b2994a4c925a31409cb6040d1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// https://github.com/rust-lang/rust/issues/7575
//@ 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());
}