My Swift experience is constrained to the GNU/Linux version, so I don't know if XCode is already doing something in this direction.
Sure one can have blessed library types that the compiler knows about, but then from language design point of view it creates a decision between those types and others written by developers, but with similar semantics.
There's nothing wrong with special treatment for stuff in the standard library. C and C++ already do this with many things (e.g. many compilers understand calls like memcpy and will emit optimized code based on the standard library semantics) and Swift gives special treatment to built-in types like Optional.
The distinction here is fairly blurred. The Swift implementation of weak pointers is mostly in the runtime library already, it's just that the compiler hides it a bit so you don't write the names of the calls directly.
Thanks for clarifying.
With Rust, while you can make use of the type system, it is harder for the compiler to provide such guidance, unless the types are somehow blessed.