summary refs log tree commit diff
path: root/src/test/ui/issues/issue-17746.rs
blob: 45c5b858ecd177b66e684713d8b21361a4b90212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// compile-pass
#![allow(dead_code)]
// Regression test for #17746

fn main() {}

struct A;

impl A {
    fn b(&mut self) {
        self.a()
    }
}

trait Foo {
    fn dummy(&self) {}
}
trait Bar {
    fn a(&self);
}

impl Foo for A {}
impl<T> Bar for T where T: Foo {
    fn a(&self) {}
}