I don't think it makes sense to associate codegen options with a construct that in Rust is supposed to be just for scoping.
Mm, this is too bad, and indeed it seems that Clang doesn't support the attribute-optimize GCC extension you mentioned under prior art. Nevertheless, that workaround doesn't seem infeasible at all, though it would be more complicated than just exposing optsize and optnone.