Upgrade to rand_core = ^0.5.1. This involves a major change to how errors are handled. See ErrorCode.
rand_core = ^0.5.1
ErrorCode
rustc version 1.42 is now required to build the library (up from 1.32).