]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-10456.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-10456.rs
CommitLineData
60c5eb7d 1// check-pass
c34b1796
AL
2// pretty-expanded FIXME #23616
3
1a4d82fc
JJ
4pub struct Foo;
5
6pub trait Bar {
7 fn bar(&self);
223e47cc
LB
8}
9
85aaf69f
SL
10pub trait Baz {
11 fn baz(&self) { }
12}
1a4d82fc
JJ
13
14impl<T: Baz> Bar for T {
15 fn bar(&self) {}
223e47cc
LB
16}
17
1a4d82fc
JJ
18impl Baz for Foo {}
19
20pub fn foo(t: Box<Foo>) {
21 t.bar(); // ~Foo doesn't implement Baz
22 (*t).bar(); // ok b/c Foo implements Baz
223e47cc
LB
23}
24
25fn main() {}