Hacker News new | ask | show | jobs
by Gwypaas 1333 days ago
If what you've created is unsound, then that is a compiler bug. Or you depend on something using unsafe which is unsound. Therefore you should, in both cases, appropriately report it.
1 comments

There is literally no such thing as a compiler bug in a language defined by "whatever the compiler does." The compiler is always, tautologically, correct.
You are being pedantic here; this stance doesn't survive contact with the real world. The fact that Rust's language reference is not complete/up to date, doesn't mean that Rust is defined _just_ by "whatever the compiler does." There are community-wide accepted documents (the reference, Rustonomicon, RFCs, and more informally, Language/Compiler team meeting notes/comments that reflect their consensus about the semantics) how Rust _ought_ to work.
By that reasoning specifications can't have bugs either. Sure, by some extreme prescriptive understanding of what a compiler or specification is, there are no bugs, but if a cryptography specification allows attacks in the threat model or rustc segfaults, all but the most asinine parties would agree there's a bug -- what's the point of asserting otherwise?