Legally speaking, the Apache License version 2.0 or the MIT license allows you to modify the code and distribute your modifications, as long as you follow the requirements in one of these licenses. (You can choose which one to use.) The Apache License includes both a copyright grant and a patent grant.
However, you cannot use the Rust trademarks (including the name “Rust” and the Rust logo) to refer to modified versions of the Rust language without permission:
Distributing a modified version of the Rust programming language or the Cargo package manager and calling it Rust or Cargo requires explicit, written permission from the Rust core team. We will usually allow these uses as long as the modifications are (1) relatively small and (2) very clearly communicated to end-users.