rust/compiler/rustc_span/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
..
analyze_source_file mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
source_map mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
symbol mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
analyze_source_file.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
caching_source_map_view.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
def_id.rs Add some docs to rustdoc::clean::inline and def_id functions 2020-10-06 09:46:00 +00:00
edition.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
fatal_error.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
hygiene.rs Remove unused code from rustc_span 2020-10-14 04:14:32 +02:00
lib.rs Remove unused code from rustc_span 2020-10-14 04:14:32 +02:00
source_map.rs Remove unused code from rustc_span 2020-10-14 04:14:32 +02:00
span_encoding.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
symbol.rs Rollup merge of #78208 - liketechnik:issue-69399, r=oli-obk 2020-10-25 18:43:40 +09:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00