traitWorks{fnfoo()-> Self;}

This is does not report any errors from the compiler. If you add a body (even { unimplemented!() }) it complains about Sized. Is there any possible implementation of this trait method that doesn't require Sized? Should the unimplemented trait method have the same warning?

I think the latter error is more due to a property of Option itself rather than of the trait

well

you can't do Option<[u32]> for example

so @Jake Goulding we intentionally (but confusingly) say that "every function body checks that its return type is sized"; this was mostly to allow us room to expand traits in the future to permit unsized types in more places

traitFnOnce{fncall(self,...);}

without requiring FnOnce: Sized

(since we expect that to be implementable for unsized types eventually)

the point is, that trait def'n doesn't have a function body, so it doesn't enforce the requirement that the parameter types are sized, though it's true that to actually implement the trait, the self type must (presently) be sized

Can the "unsized locals/rvalue" work not apply to a return type then?

Oh:

// You CANNOT have unsized return types.

The second check is that a (trait? any?) function with a body requires all param types (including return type?) to be sized.

Right. You can think of it like this:

The function body, to type-check, requires its parameters + return-type are Sized, because we wouldn't know how to generate code otherwise (but if there is no body, we don't have to generate code, so no error).

Similarly, calling a function imposes the same requirement, for the same reason.

Can the "unsized locals/rvalue" work not apply to a return type then?

No, it can't, at least, not without more complexity. The problem is that the way return types work, the caller has to allocate stack space for the callee to write into, but without knowing the type of the value that will be returned, we can't know how much stack space to allocate.