Rollup merge of #121740 - surechen:change_attribute_to_local_20240228, r=lcnr
Changing some attributes to only_local. Modified according to https://github.com/rust-lang/compiler-team/issues/505. r? ``@lcnr``
This commit is contained in:
commit
69716291c3
@ -555,16 +555,19 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
),
|
),
|
||||||
gated!(
|
gated!(
|
||||||
rustc_allow_const_fn_unstable, Normal,
|
rustc_allow_const_fn_unstable, Normal,
|
||||||
template!(Word, List: "feat1, feat2, ..."), DuplicatesOk,
|
template!(Word, List: "feat1, feat2, ..."), DuplicatesOk, @only_local: true,
|
||||||
"rustc_allow_const_fn_unstable side-steps feature gating and stability checks"
|
"rustc_allow_const_fn_unstable side-steps feature gating and stability checks"
|
||||||
),
|
),
|
||||||
gated!(
|
gated!(
|
||||||
allow_internal_unsafe, Normal, template!(Word), WarnFollowing,
|
allow_internal_unsafe, Normal, template!(Word), WarnFollowing,
|
||||||
"allow_internal_unsafe side-steps the unsafe_code lint",
|
@only_local: true, "allow_internal_unsafe side-steps the unsafe_code lint",
|
||||||
),
|
),
|
||||||
rustc_attr!(rustc_allowed_through_unstable_modules, Normal, template!(Word), WarnFollowing,
|
rustc_attr!(
|
||||||
|
rustc_allowed_through_unstable_modules, Normal, template!(Word),
|
||||||
|
WarnFollowing, @only_local: true,
|
||||||
"rustc_allowed_through_unstable_modules special cases accidental stabilizations of stable items \
|
"rustc_allowed_through_unstable_modules special cases accidental stabilizations of stable items \
|
||||||
through unstable paths"),
|
through unstable paths"
|
||||||
|
),
|
||||||
|
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Internal attributes: Type system related:
|
// Internal attributes: Type system related:
|
||||||
@ -572,7 +575,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
|
|
||||||
gated!(fundamental, Normal, template!(Word), WarnFollowing, experimental!(fundamental)),
|
gated!(fundamental, Normal, template!(Word), WarnFollowing, experimental!(fundamental)),
|
||||||
gated!(
|
gated!(
|
||||||
may_dangle, Normal, template!(Word), WarnFollowing, dropck_eyepatch,
|
may_dangle, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, dropck_eyepatch,
|
||||||
"`may_dangle` has unstable semantics and may be removed in the future",
|
"`may_dangle` has unstable semantics and may be removed in the future",
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -580,31 +584,51 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
// Internal attributes: Runtime related:
|
// Internal attributes: Runtime related:
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
rustc_attr!(rustc_allocator, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
|
rustc_attr!(
|
||||||
rustc_attr!(rustc_nounwind, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
|
rustc_allocator, Normal, template!(Word), WarnFollowing,
|
||||||
rustc_attr!(rustc_reallocator, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
|
@only_local: true, IMPL_DETAIL
|
||||||
rustc_attr!(rustc_deallocator, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
|
),
|
||||||
rustc_attr!(rustc_allocator_zeroed, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
|
rustc_attr!(
|
||||||
gated!(
|
rustc_nounwind, Normal, template!(Word), WarnFollowing,
|
||||||
default_lib_allocator, Normal, template!(Word), WarnFollowing, allocator_internals,
|
@only_local: true, IMPL_DETAIL
|
||||||
experimental!(default_lib_allocator),
|
),
|
||||||
|
rustc_attr!(
|
||||||
|
rustc_reallocator, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, IMPL_DETAIL
|
||||||
|
),
|
||||||
|
rustc_attr!(
|
||||||
|
rustc_deallocator, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, IMPL_DETAIL
|
||||||
|
),
|
||||||
|
rustc_attr!(
|
||||||
|
rustc_allocator_zeroed, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, IMPL_DETAIL
|
||||||
),
|
),
|
||||||
gated!(
|
gated!(
|
||||||
needs_allocator, Normal, template!(Word), WarnFollowing, allocator_internals,
|
default_lib_allocator, Normal, template!(Word), WarnFollowing,
|
||||||
experimental!(needs_allocator),
|
@only_local: true, allocator_internals, experimental!(default_lib_allocator),
|
||||||
|
),
|
||||||
|
gated!(
|
||||||
|
needs_allocator, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, allocator_internals, experimental!(needs_allocator),
|
||||||
|
),
|
||||||
|
gated!(
|
||||||
|
panic_runtime, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, experimental!(panic_runtime)
|
||||||
),
|
),
|
||||||
gated!(panic_runtime, Normal, template!(Word), WarnFollowing, experimental!(panic_runtime)),
|
|
||||||
gated!(
|
gated!(
|
||||||
needs_panic_runtime, Normal, template!(Word), WarnFollowing,
|
needs_panic_runtime, Normal, template!(Word), WarnFollowing,
|
||||||
experimental!(needs_panic_runtime)
|
@only_local: true, experimental!(needs_panic_runtime)
|
||||||
),
|
),
|
||||||
gated!(
|
gated!(
|
||||||
compiler_builtins, Normal, template!(Word), WarnFollowing,
|
compiler_builtins, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true,
|
||||||
"the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate \
|
"the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate \
|
||||||
which contains compiler-rt intrinsics and will never be stable",
|
which contains compiler-rt intrinsics and will never be stable",
|
||||||
),
|
),
|
||||||
gated!(
|
gated!(
|
||||||
profiler_runtime, Normal, template!(Word), WarnFollowing,
|
profiler_runtime, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true,
|
||||||
"the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate \
|
"the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate \
|
||||||
which contains the profiler runtime and will never be stable",
|
which contains the profiler runtime and will never be stable",
|
||||||
),
|
),
|
||||||
@ -630,7 +654,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
|
|||||||
template!(Word, List: "name, /*opt*/ attributes(name1, name2, ...)"), ErrorFollowing,
|
template!(Word, List: "name, /*opt*/ attributes(name1, name2, ...)"), ErrorFollowing,
|
||||||
IMPL_DETAIL,
|
IMPL_DETAIL,
|
||||||
),
|
),
|
||||||
rustc_attr!(rustc_proc_macro_decls, Normal, template!(Word), WarnFollowing, INTERNAL_UNSTABLE),
|
rustc_attr!(
|
||||||
|
rustc_proc_macro_decls, Normal, template!(Word), WarnFollowing,
|
||||||
|
@only_local: true, INTERNAL_UNSTABLE
|
||||||
|
),
|
||||||
rustc_attr!(
|
rustc_attr!(
|
||||||
rustc_macro_transparency, Normal,
|
rustc_macro_transparency, Normal,
|
||||||
template!(NameValueStr: "transparent|semitransparent|opaque"), ErrorFollowing,
|
template!(NameValueStr: "transparent|semitransparent|opaque"), ErrorFollowing,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user