blob: 1ce7f744b9c6e5e2d49db51d20aade5c0af48df8 [file]
//! Regression test for <https://github.com/rust-lang/rust/issues/25279>.
//! Ensure we're not ICE'ing on calls to Self method in method body.
//! (when implementing on type with lifetimes)
//@ run-pass
struct S<'a>(&'a ());
impl<'a> S<'a> {
fn foo(self) -> &'a () {
<Self>::bar(self)
}
fn bar(self) -> &'a () {
self.0
}
}
fn main() {
S(&()).foo();
}