Port to the latest Rust

Remove deprecated fixed stack segment attributes.

Move from do notation to proc notation for unported methods (methods
such as as with_ref should probable take proc types but have not been
coded to use them yet.)