rust/compiler
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
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena Track element count only for types that need drop 2020-10-20 17:01:51 +02:00
rustc_ast Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
rustc_ast_lowering Auto merge of #77546 - lcnr:impl-trait-closure, r=eddyb 2020-10-25 07:03:58 +00:00
rustc_ast_passes Lower inline const's AST to HIR 2020-10-16 15:21:16 -03:00
rustc_ast_pretty Drop unneeded mut 2020-10-20 16:42:51 +02:00
rustc_attr switch allow_internal_unstable const fns to rustc_allow_const_fn_unstable 2020-10-21 20:54:20 +02:00
rustc_builtin_macros Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
rustc_codegen_llvm Upgrade to measureme 9.0.0 2020-10-24 22:39:42 -04:00
rustc_codegen_ssa Make codegen coverage_context optional, and check 2020-10-23 12:00:30 -07:00
rustc_data_structures Upgrade to measureme 9.0.0 2020-10-24 22:39:42 -04:00
rustc_driver Rollup merge of #77493 - hosseind88:ICEs_should_always_print_the_top_of_the_query_stack, r=oli-obk 2020-10-16 02:10:09 +02:00
rustc_error_codes Rollup merge of #77971 - jyn514:broken-intra-doc-links, r=mark-simulacrum 2020-10-17 05:36:49 +09:00
rustc_errors Remove unused code from remaining compiler crates 2020-10-14 04:14:32 +02:00
rustc_expand ignore #[rustc_allow_const_fn_unstable] for macro expansion 2020-10-23 16:54:25 +02:00
rustc_feature Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
rustc_fs_util Remove unused code from remaining compiler crates 2020-10-14 04:14:32 +02:00
rustc_graphviz /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_hir Auto merge of #77546 - lcnr:impl-trait-closure, r=eddyb 2020-10-25 07:03:58 +00:00
rustc_hir_pretty Do not print braces again print_anon_const already does it 2020-10-19 16:26:13 -03:00
rustc_incremental /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_index cache types during normalization 2020-09-19 17:27:13 +02:00
rustc_infer Reduce diagram mess in 'match arms have incompatible types' error 2020-10-22 16:16:02 -07:00
rustc_interface Strip tokens before printing AST JSON 2020-10-21 19:44:33 -04:00
rustc_lexer Noticed a potential bug in eat_while(): it doesn't account for number of UTF8 bytes. 2020-10-09 11:12:54 +02:00
rustc_lint Rollup merge of #78155 - est31:rustc_lint_types_refactor, r=davidtwco 2020-10-22 09:45:38 +09:00
rustc_llvm Auto merge of #76859 - Aaron1011:fix/llvm-cgu-reuse, r=davidtwco,nikic 2020-10-11 20:50:02 +00:00
rustc_macros Retire rustc_dep_node_try_load_from_on_disk_cache. 2020-10-22 23:04:46 +02:00
rustc_metadata Compute proper module parent during resolution 2020-10-24 14:28:13 -04:00
rustc_middle Rollup merge of #77984 - Aaron1011:fix/macro-mod-weird-parent, r=petrochenkov 2020-10-25 18:43:37 +09:00
rustc_mir Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
rustc_mir_build Rollup merge of #78072 - Nadrieril:cleanup-constant-matching, r=varkor 2020-10-24 22:39:51 +02:00
rustc_parse Auto merge of #77255 - Aaron1011:feature/collect-attr-tokens, r=petrochenkov 2020-10-24 19:23:32 +00:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
rustc_plugin_impl /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_privacy Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_query_system Remove unused ProfileCategory. 2020-10-22 22:35:32 +02:00
rustc_resolve Rollup merge of #77984 - Aaron1011:fix/macro-mod-weird-parent, r=petrochenkov 2020-10-25 18:43:37 +09:00
rustc_save_analysis fix save-analysis 2020-10-22 21:11:50 +02:00
rustc_serialize Replace absolute paths with relative ones 2020-10-13 14:16:45 +02:00
rustc_session Remove rustc_session::config::Config 2020-10-15 12:02:24 +02:00
rustc_span Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
rustc_symbol_mangling Update to rustc-demangle 0.1.18 2020-10-21 21:11:11 +01:00
rustc_target Rollup merge of #77716 - francesca64:revert-ios-dynamic-linking, r=jonas-schievink 2020-10-24 14:11:59 +02:00
rustc_trait_selection Rollup merge of #78272 - lcnr:abstract-const-unused-node, r=oli-obk 2020-10-24 22:39:57 +02:00
rustc_traits Review comments 2020-10-16 12:58:50 -04:00
rustc_ty Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_typeck Auto merge of #77546 - lcnr:impl-trait-closure, r=eddyb 2020-10-25 07:03:58 +00:00