]> git.lizzy.rs Git - rust.git/blob - src/test/ui/object-safety/issue-19538.rs
Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into sync_cg_clif-2022-08-24
[rust.git] / src / test / ui / object-safety / issue-19538.rs
1 trait Foo {
2     fn foo<T>(&self, val: T);
3 }
4
5 trait Bar: Foo { }
6
7 pub struct Thing;
8
9 impl Foo for Thing {
10     fn foo<T>(&self, val: T) { }
11 }
12
13 impl Bar for Thing { }
14
15 fn main() {
16     let mut thing = Thing;
17     let test: &mut dyn Bar = &mut thing;
18     //~^ ERROR E0038
19     //~| ERROR E0038
20 }