]>
git.proxmox.com Git - rustc.git/blob - tests/ui/self/arbitrary-self-types-not-object-safe.rs
1 // revisions: curr object_safe_for_dispatch
3 #![cfg_attr(object_safe_for_dispatch, feature(object_safe_for_dispatch))]
8 fn foo(self: &Rc
<Self>) -> usize;
12 fn foo(self: &Rc
<Self>) -> usize where Self: Sized
;
13 fn bar(self: Rc
<Self>) -> usize;
17 fn foo(self: &Rc
<Self>) -> usize {
23 fn foo(self: &Rc
<Self>) -> usize {
27 fn bar(self: Rc
<Self>) -> usize {
33 let x
= Rc
::new(5usize
) as Rc
<dyn Foo
>;
34 //[curr]~^ ERROR E0038
35 //[curr]~| ERROR E0038
36 //[object_safe_for_dispatch]~^^^ ERROR E0038
40 let x
= Rc
::new(5usize
) as Rc
<dyn Bar
>;