Require stable/unstable annotations for the constness of all stable fns with a const modifier
r? @RalfJung @Centril
Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
SGX: Change ELF entrypoint
This fixes [rust-sgx issue #148](https://github.com/fortanix/rust-sgx/issues/148).
A new entry point is created for the ELF file generated by `rustc`, separate from the enclave entry point. When the ELF file is executed as a Linux binary, the error message below is written to stderr.
> Error: This file is an SGX enclave which cannot be executed as a standard Linux binary.
> See the installation guide at https://edp.fortanix.com/docs/installation/guide/ on how to use 'cargo run' or follow the steps at https://edp.fortanix.com/docs/tasks/deployment/ for manual deployment.
When the ELF file is converted to an SGXS using `elf2sgxs`, the old entry point is still set as the enclave entry point. In a future pull request in the rust-sgx repository, `elf2sgxs` will be modified to remove the code in the ELF entry point, since this code is not needed in the enclave.
Rollup of 7 pull requests
Successful merges:
- #67026 (Improve diagnostics and code for exhaustiveness of empty matches)
- #67235 (VecDeque: drop remaining items on destructor panic)
- #67254 (dont ICE in case of invalid drop fn)
- #67256 (Reduce allocs for validation errors)
- #67274 (be explicit that mem::uninitialized is the same as MaybeUninit::uninit().assume_init())
- #67278 (`coerce_inner`: use initial `expected_ty`)
- #67280 (docs: std::convert::From: Fix typo)
Failed merges:
r? @ghost
Improve diagnostics and code for exhaustiveness of empty matches
There was a completely separate check and diagnostics for the case of an empty match. This led to slightly different error messages and duplicated code.
This improves code reuse and generally clarifies what happens for empty matches. This also clarifies the action of the `exhaustive_patterns` feature, and ensures that this feature doesn't change diagnostics in places it doesn't need to.
Conditionals and loops now have unstable features, and `feature_err` has
its own error code. I think that `feature_err` should take an error code
as a parameter, but don't have the energy to make this change throughout
the codebase. Also, the error code system may be torn out entirely.