diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-03-07 15:34:14 +0100 |
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-06-12 09:57:38 +0200 |
| commit | e2afe04e2e45aff24bcc4e78cae04acdba8edcef (patch) | |
| tree | 0c7d3e53ee910521bfba47f227dd708a4efdff79 /compiler/rustc_attr_parsing/src/attributes/mod.rs | |
| parent | e6a5f281ec2b78b3089dcd9fd941d9d14921c6fa (diff) | |
| download | rust-e2afe04e2e45aff24bcc4e78cae04acdba8edcef.tar.gz rust-e2afe04e2e45aff24bcc4e78cae04acdba8edcef.zip | |
remove 'static in some places
Diffstat (limited to 'compiler/rustc_attr_parsing/src/attributes/mod.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/attributes/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<S: Stage>: 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<S: Stage>: 'static { - const PATH: &'static [Symbol]; + const PATH: &[Symbol]; const ATTRIBUTE_ORDER: AttributeOrder; const ON_DUPLICATE: OnDuplicate<S>; @@ -151,7 +151,7 @@ pub(crate) enum OnDuplicate<S: Stage> { /// 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<E> = fn(ThinVec<E>) -> 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<S: Stage>: 'static { - const PATH: &'static [Symbol]; + const PATH: &[rustc_span::Symbol]; type Item; const CONVERT: ConvertFn<Self::Item>; |
