1
Fork 0

Implement #[rustc_skip_array_during_method_dispatch]

This commit is contained in:
Josh Stone 2021-04-12 16:03:53 -07:00
parent 2faef12b65
commit b79af2fcde
8 changed files with 38 additions and 1 deletions

View file

@ -540,6 +540,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
rustc_main, Normal, template!(Word),
"the `#[rustc_main]` attribute is used internally to specify test entry point function",
),
rustc_attr!(
rustc_skip_array_during_method_dispatch, Normal, template!(Word),
"the `#[rustc_skip_array_during_method_dispatch]` attribute is used to exclude a trait \
from method dispatch when the receiver is an array, for compatibility in editions < 2021."
),
// ==========================================================================
// Internal attributes, Testing: