summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-trait_upcasting.rs
blob: e4102f1cfa75d1ea48049b16d3a788d5e0b95944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
trait Foo {}

trait Bar: Foo {}

impl Foo for () {}

impl Bar for () {}

fn main() {
    let bar: &dyn Bar = &();
    let foo: &dyn Foo = bar;
    //~^ ERROR trait upcasting coercion is experimental [E0658]
}