1
1
use std:: num:: NonZero ;
2
2
3
- use rustc_attr_data_structures:: { AllowedThroughUnstableModules , AttributeKind , DefaultBodyStability , PartialConstStability , Stability , StabilityLevel , StableSince , UnstableReason , VERSION_PLACEHOLDER } ;
3
+ use rustc_attr_data_structures:: {
4
+ AllowedThroughUnstableModules , AttributeKind , DefaultBodyStability , PartialConstStability , Stability , StabilityLevel , StableSince , UnstableReason , VERSION_PLACEHOLDER
5
+ } ;
4
6
use rustc_span:: { ErrorGuaranteed , Span , Symbol , sym} ;
5
7
6
8
use super :: util:: parse_version;
7
9
use super :: { AttributeGroup , AttributeMapping , SingleAttributeGroup } ;
8
10
use crate :: context:: { AttributeAcceptContext , AttributeGroupContext } ;
9
- use crate :: parser:: { ArgParser , MetaItemParser , NameValueParser } ;
11
+ use crate :: parser:: { ArgParser , MetaItemParser } ;
10
12
use crate :: session_diagnostics:: { self , UnsupportedLiteralReason } ;
11
13
12
14
#[ derive( Default ) ]
@@ -112,10 +114,7 @@ impl SingleAttributeGroup for ConstStabilityIndirectGroup {
112
114
// ignore
113
115
fn on_duplicate ( _cx : & AttributeAcceptContext < ' _ > , _first_span : Span ) { }
114
116
115
- fn convert (
116
- _cx : & AttributeAcceptContext < ' _ > ,
117
- _args : & super :: GenericArgParser < ' _ , rustc_ast:: Expr > ,
118
- ) -> Option < AttributeKind > {
117
+ fn convert ( _cx : & AttributeAcceptContext < ' _ > , _args : & ArgParser < ' _ > ) -> Option < AttributeKind > {
119
118
Some ( AttributeKind :: ConstStabilityIndirect )
120
119
}
121
120
}
@@ -190,9 +189,9 @@ impl AttributeGroup for ConstStabilityGroup {
190
189
///
191
190
/// Emits an error when either the option was already Some, or the arguments weren't of form
192
191
/// `name = value`
193
- fn insert_value_into_option_or_error < ' a > (
192
+ fn insert_value_into_option_or_error (
194
193
cx : & AttributeAcceptContext < ' _ > ,
195
- param : & impl MetaItemParser < ' a > ,
194
+ param : & MetaItemParser < ' _ > ,
196
195
item : & mut Option < Symbol > ,
197
196
) -> Option < ( ) > {
198
197
if item. is_some ( ) {
@@ -217,9 +216,9 @@ fn insert_value_into_option_or_error<'a>(
217
216
218
217
/// Read the content of a `stable`/`rustc_const_stable` attribute, and return the feature name and
219
218
/// its stability information.
220
- pub ( crate ) fn parse_stability < ' a > (
219
+ pub ( crate ) fn parse_stability (
221
220
cx : & AttributeAcceptContext < ' _ > ,
222
- args : & ' a impl ArgParser < ' a > ,
221
+ args : & ArgParser < ' _ > ,
223
222
) -> Option < ( Symbol , StabilityLevel ) > {
224
223
let mut feature = None ;
225
224
let mut since = None ;
@@ -283,9 +282,9 @@ pub(crate) fn parse_stability<'a>(
283
282
284
283
// Read the content of a `unstable`/`rustc_const_unstable`/`rustc_default_body_unstable`
285
284
/// attribute, and return the feature name and its stability information.
286
- pub ( crate ) fn parse_unstability < ' a > (
285
+ pub ( crate ) fn parse_unstability (
287
286
cx : & AttributeAcceptContext < ' _ > ,
288
- args : & ' a impl ArgParser < ' a > ,
287
+ args : & ArgParser < ' _ > ,
289
288
) -> Option < ( Symbol , StabilityLevel ) > {
290
289
let mut feature = None ;
291
290
let mut reason = None ;
0 commit comments