rust/compiler/rustc_passes/src
Yuki Okushi 72e02b015e
Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk
replace `#[allow_internal_unstable]` with `#[rustc_allow_const_fn_unstable]` for `const fn`s

`#[allow_internal_unstable]` is currently used to side-step feature gate and stability checks.
While it was originally only meant to be used only on macros, its use was expanded to `const fn`s.

This pr adds stricter checks for the usage of `#[allow_internal_unstable]` (only on macros) and introduces the `#[rustc_allow_const_fn_unstable]` attribute for usage on `const fn`s.

This pr does not change any of the functionality associated with the use of `#[allow_internal_unstable]` on macros or the usage of `#[rustc_allow_const_fn_unstable]` (instead of `#[allow_internal_unstable]`) on `const fn`s (see https://github.com/rust-lang/rust/issues/69399#issuecomment-712911540).

Note: The check for `#[rustc_allow_const_fn_unstable]` currently only validates that the attribute is used on a function, because I don't know how I would check if the function is a `const fn` at the place of the check. I therefore openend this as a 'draft pull request'.

Closes rust-lang/rust#69399

r? @oli-obk
2020-10-25 18:43:40 +09:00
..
check_attr.rs Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
check_const.rs switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable 2020-10-21 20:54:20 +02:00
dead.rs Remove weird slice conversion 2020-10-18 10:31:58 +02:00
diagnostic_items.rs transmute: use diagnostic item 2020-09-19 11:33:11 +02:00
entry.rs Enforce crate level attributes checks 2020-10-04 13:36:47 +02:00
hir_id_validator.rs implement nits 2020-10-07 10:19:04 +02:00
hir_stats.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
intrinsicck.rs Replace target.target with target and target.ptr_width with target.pointer_width 2020-10-15 12:02:24 +02:00
lang_items.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
layout_test.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib_features.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib.rs liveness: Use newtype_index for Variable and LiveNode 2020-09-26 16:44:41 +02:00
liveness.rs Mark InOut operands as used in RWU table with write_place 2020-10-18 23:51:10 -05:00
loops.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
reachable.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
region.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
stability.rs stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' 2020-10-16 11:33:33 +02:00
upvars.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
weak_lang_items.rs Replace target.target with target and target.ptr_width with target.pointer_width 2020-10-15 12:02:24 +02:00