You're right, it would be a huge impact, and I agree that it would at a minimum require waiting until the 2024 edition is out to be stabilized (if nothing else, RFC 3098 and RFC 3101 would need to be accepted, stabilized, and part of rustc first).
I want to be clear, I'm not for or against any particular method of dealing with this, as long as the chosen method solves the problem. If rustc
had a rewrite flag added to it that rewrote most code so that you knew what the types were, that would be a reasonable 80% solution. If k#u8
were a part of the language, that would work too. If there were a switch (even an unstable switch!) that made all of the primitives and everything in the prelude unable to be shadowed, that would be an 80% solution too1. All I want is some way of quickly and easily verifying that certain basic types haven't been replaced behind my back, and I'm willing to entertain any ideas that help solve the issue.
1I know that it's common for crates to define their own version of Result
, so it isn't possible to turn the primitive types and most of the prelude into a keyword with an unstable switch; this was part of the reason for a rewrite switch or k#u8
style tricks.