2019-11-03 18:00:00 -06:00
|
|
|
// check-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-31 18:22:23 -05:00
|
|
|
// 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) {}
|
|
|
|
}
|