A `Def::Variant` should be considered as a function in mir pretty
printing. Each variant has a constructor that we must print.
Given the following enum definition:
```
pub enum TestMe {
X(usize),
}
```
We will need to generate a constructor for the variant `X` with a
signature that looks something like the following:
```
fn TestMe::X(_1: usize) -> TestMe;
```
Fix segfaults in release build C-variadic fns
`va_start` and `va_end` must be called to initialize/cleanup the
"spoofed" `VaList` in a Rust defined C-variadic function even if
the `VaList` is not used.
r? @alexreg
Fixes: #58980
HirIdification: almost there
The next iteration of HirIdification (#57578).
Replaces a bunch of `NodeId` method calls (mostly `as_local_node_id`) with `HirId` ones.
Removes `NodeId` from:
- [x] `PathSegment`
- [x] `PatKind`
- [x] `Destination` (replaces it with `HirId`)
In addition this PR also removes `Visitor::visit_def_mention`, which doesn't seem to be doing anything.
Create a derive macro for HashStable and allow proc macros in rustc
A combination of https://github.com/rust-lang/rust/pull/56864 and https://github.com/rust-lang/rust/pull/56795. There were complications with using `serde_derive` as rustc doesn't know which crate to use for the host when there is a serde_derive in the sysroot and cargo passes another on the command line built from crates.io.
r? @eddyb (for proc macro changes) @alexcrichton (for rustbuild changes) @michaelwoerister (for the macro itself)
`va_start` and `va_end` must be called to initialize/cleanup the
"spoofed" `VaList` in a Rust defined C-variadic function even if
the `VaList` is not used.
Add const generics to ty (and transitive dependencies)
Split out from #53645. This work is a collaborative effort with @yodaldevoid.
There are a number of stubs. Some I plan to leave for the next PRs (e.g. `infer` and `rustdoc`). Others I can either fix up in this PR, or as follow ups (which would avoid the time-consuming rebasing).
It was a little hard to split this up, as so much depends on ty and friends. Apologies for the large diff.
r? @eddyb