From b79af2fcde91abeae805c2dbccfdbf7114bfd47b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 12 Apr 2021 16:03:53 -0700 Subject: Implement #[rustc_skip_array_during_method_dispatch] --- compiler/rustc_feature/src/builtin_attrs.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_feature') diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index f286ea7cdec..be3caf709c7 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -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: -- cgit 1.4.1-3-g733a5