add rustc_private as a proper language feature gate
At the moment, `rustc_private` as a (library) feature exists by
accident: `char::is_xid_start`, `char::is_xid_continue` methods in
libcore define it.
cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20to.20declare.20new.20langauge.20feature.3F
I don't know if this is at all reasonable, but at least tests seem to pass locally. That probably means that we can remove/rename to something more resonable the feature in libcore in the next release?
move unescape module to rustc_lexer
It makes sense to keep the definition of escape sequences closer to the lexer itself, and it is also a bit of code that I would like to share with rust-analyzer.
r? @petrochenkov
rustc_typeck: improve diagnostics for _ const/static declarations
This continues https://github.com/rust-lang/rust/pull/62694 and adds type suggestions to const/static declarations with `_` type.
r? @eddyb
Use sharded maps for interning
Cuts down runtime from 5.5s to 3.8s for non-incremental `syntex_syntax` check builds with 16 threads / 8 cores.
r? @eddyb
Rollup of 14 pull requests
Successful merges:
- #62709 (Test that maplike FromIter satisfies uniqueness)
- #62713 (Stabilize <*mut _>::cast and <*const _>::cast)
- #62746 ( do not use assume_init in std::io)
- #62787 (Fix typo in src/libstd/net/udp.rs doc comment)
- #62788 (normalize use of backticks in compiler messages for libcore/ptr)
- #62799 (use const array repeat expressions for uninit_array)
- #62810 (normalize use of backticks in compiler messages for librustc_lint)
- #62812 (normalize use of backticks in compiler messages for librustc_metadata)
- #62832 (normalize use of backticks in compiler messages for librustc_incremental)
- #62845 (read: fix doc comment)
- #62853 (normalize use of backticks in compiler messages for librustc/hir)
- #62854 (Fix typo in Unicode character name)
- #62858 (Change wrong variable name.)
- #62870 (fix lexing of comments with many \r)
Failed merges:
r? @ghost
Fix typo in Unicode character name
There's a small typo in the Unicode character definitions: "Latin Epigraphic Letter Dideways" should be "Latin Epigraphic Letter Sideways I" (see [here](https://www.compart.com/en/unicode/U+A7F7)).
use const array repeat expressions for uninit_array
With a first implementation of https://github.com/rust-lang/rust/issues/49147 having landed, we can make this macro nicer and phase it out with the next bootstrap bump.
However, to make this work, we have to mark `MaybeUninit::uninit()` as promotable. I do feel uneasy about promoting stuff involving uninitialized memory, but OTOH no *operation* on `MaybeUninit` is promotable, so maybe this is okay?
r? @oli-obk @eddyb