about summary refs log tree commit diff
path: root/compiler/rustc_plugin_impl/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-23 05:40:35 +0000
committerbors <bors@rust-lang.org>2020-09-23 05:40:35 +0000
commitf6d59207ad56e24a2bfefa3544de48a0f6491363 (patch)
tree6442243a32fe58e232cd5e204045d15bd7843b5e /compiler/rustc_plugin_impl/src/lib.rs
parente62323df22ecf9c163023132d17b7114f68b72e8 (diff)
parent186d148b4cd67223fde15b421086e74a95501096 (diff)
downloadrust-f6d59207ad56e24a2bfefa3544de48a0f6491363.tar.gz
rust-f6d59207ad56e24a2bfefa3544de48a0f6491363.zip
Auto merge of #76850 - ecstatic-morse:const-checking-refactor, r=oli-obk
Remove `qualify_min_const_fn`

~~Blocked on #76807 (the first six commits).~~

With this PR, all checks in `qualify_min_const_fn` are replicated in `check_consts`, and the former is no longer invoked. My goal was to have as few changes to test output as possible, since making sweeping changes to the code *while* doing big batches of diagnostics updates turned out to be a headache. To this end, there's a few `HACK`s in `check_consts` to achieve parity with `qualify_min_const_fn`.

The new system that replaces `is_min_const_fn` is referred to as "const-stability"  My end goal for the const-stability rules is this:
* Const-stability is only applicable to functions defined in `staged_api` crates.
* All functions not marked `rustc_const_unstable` are considered "const-stable".
    - NB. This is currently not implemented. `#[unstable]` functions are also const-unstable. This causes problems when searching for feature gates.
    - All "const-unstable" functions have an associated feature gate
* const-stable functions can only call other const-stable functions
     - `allow_internal_unstable` can be used to circumvent this.
* All const-stable functions are subject to some additional checks (the ones that were unique to `qualify_min_const_fn`)

The plan is to remove each `HACK` individually in subsequent PRs. That way, changes to error message output can be reviewed in isolation.
Diffstat (limited to 'compiler/rustc_plugin_impl/src/lib.rs')
0 files changed, 0 insertions, 0 deletions