Rust's type system is very Haskell/ML inspired, specifically the first class support for algebraic types and pattern matching.
Modern C++ has come a long way with typed optionals and variants, but it's very tacked-on and lacks the safety guarantees and ergonomics of a language designed with this paradigm at a fundamental level.