rust/tests/ui/traits/bound/on-structs-and-enums-rpass.rs

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

22 lines
304 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
#![allow(unused_variables)]
// pretty-expanded FIXME #23616
2015-04-18 00:12:20 -05:00
trait U {}
trait T<X: U> { fn get(self) -> X; }
2015-04-18 00:12:20 -05:00
trait S2<Y: U> {
2019-05-28 13:47:21 -05:00
fn m(x: Box<dyn T<Y>+'static>) {}
}
struct St<X: U> {
2019-05-28 13:47:21 -05:00
f: Box<dyn T<X>+'static>,
}
impl<X: U> St<X> {
fn blah() {}
}
fn main() {}