File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ Object safe traits can be the base trait of a [trait object]. A trait is
7272* It must not have any associated constants.
7373* It must not have any associated types with generics.
7474* All associated functions must either be dispatchable from a trait object or be explicitly non-dispatchable:
75- * Dispatchable functions require :
76- * Not have any type parameters (although lifetime parameters are allowed),
75+ * Dispatchable functions must :
76+ * Not have any type parameters (although lifetime parameters are allowed).
7777 * Be a [ method] that does not use ` Self ` except in the type of the receiver.
7878 * Have a receiver with one of the following types:
7979 * ` &Self ` (i.e. ` &self ` )
@@ -82,7 +82,10 @@ Object safe traits can be the base trait of a [trait object]. A trait is
8282 * [ ` Rc<Self> ` ]
8383 * [ ` Arc<Self> ` ]
8484 * [ ` Pin<P> ` ] where ` P ` is one of the types above
85- * Does not have a ` where Self: Sized ` bound (receiver type of ` Self ` (i.e. ` self ` ) implies this).
85+ * Not have an opaque return type; that is,
86+ * Not be an ` async fn ` (which has a hidden ` Future ` type).
87+ * Not have a return position ` impl Trait ` type (` fn example(&self) -> impl Trait ` ).
88+ * Not have a ` where Self: Sized ` bound (receiver type of ` Self ` (i.e. ` self ` ) implies this).
8689 * Explicitly non-dispatchable functions require:
8790 * Have a ` where Self: Sized ` bound (receiver type of ` Self ` (i.e. ` self ` ) implies this).
8891
You can’t perform that action at this time.
0 commit comments