From e2afe04e2e45aff24bcc4e78cae04acdba8edcef Mon Sep 17 00:00:00 2001 From: Jana Dönszelmann Date: Fri, 7 Mar 2025 15:34:14 +0100 Subject: remove 'static in some places --- compiler/rustc_attr_parsing/src/attributes/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_attr_parsing/src/attributes/mod.rs') diff --git a/compiler/rustc_attr_parsing/src/attributes/mod.rs b/compiler/rustc_attr_parsing/src/attributes/mod.rs index 1d239bd43f4..caf55e6685e 100644 --- a/compiler/rustc_attr_parsing/src/attributes/mod.rs +++ b/compiler/rustc_attr_parsing/src/attributes/mod.rs @@ -12,7 +12,7 @@ //! - [`CombineAttributeParser`]: makes it easy to implement an attribute which should combine the //! contents of attributes, if an attribute appear multiple times in a list //! -//! Attributes should be added to [`ATTRIBUTE_PARSERS`](crate::context::ATTRIBUTE_PARSERS) to be parsed. +//! Attributes should be added to `crate::context::ATTRIBUTE_PARSERS` to be parsed. use std::marker::PhantomData; @@ -83,7 +83,7 @@ pub(crate) trait AttributeParser: Default + 'static { /// [`SingleAttributeParser`] can only convert attributes one-to-one, and cannot combine multiple /// attributes together like is necessary for `#[stable()]` and `#[unstable()]` for example. pub(crate) trait SingleAttributeParser: 'static { - const PATH: &'static [Symbol]; + const PATH: &[Symbol]; const ATTRIBUTE_ORDER: AttributeOrder; const ON_DUPLICATE: OnDuplicate; @@ -151,7 +151,7 @@ pub(crate) enum OnDuplicate { /// Custom function called when a duplicate attribute is found. /// /// - `unused` is the span of the attribute that was unused or bad because of some - /// duplicate reason (see [`AttributeDuplicates`]) + /// duplicate reason (see [`AttributeOrder`]) /// - `used` is the span of the attribute that was used in favor of the unused attribute Custom(fn(cx: &AcceptContext<'_, '_, S>, used: Span, unused: Span)), } @@ -217,7 +217,7 @@ type ConvertFn = fn(ThinVec) -> AttributeKind; /// [`CombineAttributeParser`] can only convert a single kind of attribute, and cannot combine multiple /// attributes together like is necessary for `#[stable()]` and `#[unstable()]` for example. pub(crate) trait CombineAttributeParser: 'static { - const PATH: &'static [Symbol]; + const PATH: &[rustc_span::Symbol]; type Item; const CONVERT: ConvertFn; -- cgit 1.4.1-3-g733a5