]> git.proxmox.com Git - rustc.git/blame - src/test/ui/dyn-star/upcast.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / dyn-star / upcast.rs
CommitLineData
487cf647 1// known-bug: #104800
2b03887a
FG
2
3#![feature(dyn_star, trait_upcasting)]
2b03887a
FG
4
5trait Foo: Bar {
6 fn hello(&self);
7}
8
9trait Bar {
10 fn world(&self);
11}
12
13struct W(usize);
14
15impl Foo for W {
16 fn hello(&self) {
17 println!("hello!");
18 }
19}
20
21impl Bar for W {
22 fn world(&self) {
23 println!("world!");
24 }
25}
26
27fn main() {
28 let w: dyn* Foo = W(0);
29 w.hello();
30 let w: dyn* Bar = w;
31 w.world();
32}