To name a few: generics, pattern matching, memory safety by default (though not concurrent yet), no untyped-nil, the capability for C-like performance, deterministic memory management. Protocols are pretty similar to traits as well.
Though the way all of those work is substantially different. Swift doesn't monomorphize generics like Rust does[0], for example.
Swift doesn't have a concurrency story yet, so it is possible to have data races if you share data between threads. An ownership system[1] is in the works, but it is not complete yet.
> Swift doesn't monomorphize generics like Rust does[0], for example.
Swift can monomorphize generics, but it doesn't do so by default. Normally this is left up to the compiler, but it's possible to force monomorphization using inlining attributes.
Though the way all of those work is substantially different. Swift doesn't monomorphize generics like Rust does[0], for example.
Swift doesn't have a concurrency story yet, so it is possible to have data races if you share data between threads. An ownership system[1] is in the works, but it is not complete yet.
[0]https://www.reddit.com/r/rust/comments/7gkiie/implementing_s... [1]https://github.com/apple/swift/blob/master/docs/OwnershipMan...