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