]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-trait_upcasting.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / feature-gates / feature-gate-trait_upcasting.rs
1 trait Foo {}
2
3 trait Bar: Foo {}
4
5 impl Foo for () {}
6
7 impl Bar for () {}
8
9 fn main() {
10     let bar: &dyn Bar = &();
11     let foo: &dyn Foo = bar;
12     //~^ ERROR trait upcasting coercion is experimental [E0658]
13 }