Re:Why Discord is switching from Go to Rust
by estebank on Wednesday February 05, 2020 @01:15AM
(#22244429)
This is not entirely correct. These things that "can only be used by the compiler" are nightly features that haven't been stabilized yet. Some of them might never be stabilized, but you could always use them in a nightly conpiler, stability assurances just fly out the window then. This is also why using that environment variable is highly discouraged: it breaks the stability guarantees of the language and you're effectively using a pinned nightly. This is reasonable only in a very small handful of cases.
[ Parent
| on HN ]
Re:Why Discord is switching from Go to Rust
by giornogiovanna on Wednesday February 05, 2020 @01:53AM
(#22244596)
Yep. Beyond that, there is at least one place[0] where the standard library uses undefined behavior "based on its privileged knowledge of rustc internals".
Re:Why Discord is switching from Go to Rust
by dodobirdlord on Wednesday February 05, 2020 @02:25AM
(#22244718)
I don't see what is incorrect? Perhaps I was insufficiently clear that when I said "the compiler" I meant "the stable compiler" as opposed to more generally all possible versions of rustc. The stable compiler is permitted to use unstable features for its own bootstrap, example being the limited use of const generics to compile parts of the standard library.