mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
26 lines
290 B
Rust
26 lines
290 B
Rust
//@ check-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) {}
|
|
}
|