Files
rust/tests/ui/traits/impl-trait-chain-14229.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
305 B
Rust
Raw Normal View History

2025-07-24 17:52:22 +05:00
//! Regression test for https://github.com/rust-lang/rust/issues/14229
//@ run-pass
2015-07-20 08:31:54 -04:00
trait Foo: Sized {
fn foo(self) {}
}
trait Bar: Sized {
fn bar(self) {}
}
struct S;
impl<'l> Foo for &'l S {}
impl<T: Foo> Bar for T {}
fn main() {
let s = S;
s.foo();
(&s).bar();
s.bar();
}