@@ -10,7 +10,7 @@ use thin_vec::ThinVec;
1010use super :: prelude:: { ALL_TARGETS , AllowedTargets } ;
1111use super :: { AcceptMapping , AttributeParser } ;
1212use crate :: context:: { AcceptContext , FinalizeContext , Stage } ;
13- use crate :: parser:: { ArgParser , MetaItemOrLitParser , MetaItemParser , PathParser } ;
13+ use crate :: parser:: { ArgParser , MetaItemOrLitParser , MetaItemParser , OwnedPathParser } ;
1414use crate :: session_diagnostics:: {
1515 DocAliasBadChar , DocAliasEmpty , DocAliasMalformed , DocAliasStartEnd , DocAttributeNotAttribute ,
1616 DocKeywordNotKeyword ,
@@ -43,10 +43,10 @@ fn check_attribute<S: Stage>(
4343 false
4444}
4545
46- fn parse_keyword_and_attribute < ' c , S , F > (
47- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
48- path : & PathParser < ' _ > ,
49- args : & ArgParser < ' _ > ,
46+ fn parse_keyword_and_attribute < S , F > (
47+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
48+ path : & OwnedPathParser ,
49+ args : & ArgParser ,
5050 attr_value : & mut Option < ( Symbol , Span ) > ,
5151 callback : F ,
5252) where
@@ -82,10 +82,10 @@ pub(crate) struct DocParser {
8282}
8383
8484impl DocParser {
85- fn parse_single_test_doc_attr_item < ' c , S : Stage > (
85+ fn parse_single_test_doc_attr_item < S : Stage > (
8686 & mut self ,
87- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
88- mip : & ' c MetaItemParser < ' _ > ,
87+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
88+ mip : & MetaItemParser ,
8989 ) {
9090 let path = mip. path ( ) ;
9191 let args = mip. args ( ) ;
@@ -132,9 +132,9 @@ impl DocParser {
132132 }
133133 }
134134
135- fn add_alias < ' c , S : Stage > (
135+ fn add_alias < S : Stage > (
136136 & mut self ,
137- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
137+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
138138 alias : Symbol ,
139139 span : Span ,
140140 ) {
@@ -167,11 +167,11 @@ impl DocParser {
167167 self . attribute . aliases . insert ( alias, span) ;
168168 }
169169
170- fn parse_alias < ' c , S : Stage > (
170+ fn parse_alias < S : Stage > (
171171 & mut self ,
172- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
173- path : & PathParser < ' _ > ,
174- args : & ArgParser < ' _ > ,
172+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
173+ path : & OwnedPathParser ,
174+ args : & ArgParser ,
175175 ) {
176176 match args {
177177 ArgParser :: NoArgs => {
@@ -197,11 +197,11 @@ impl DocParser {
197197 }
198198 }
199199
200- fn parse_inline < ' c , S : Stage > (
200+ fn parse_inline < S : Stage > (
201201 & mut self ,
202- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
203- path : & PathParser < ' _ > ,
204- args : & ArgParser < ' _ > ,
202+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
203+ path : & OwnedPathParser ,
204+ args : & ArgParser ,
205205 inline : DocInline ,
206206 ) {
207207 if let Err ( span) = args. no_args ( ) {
@@ -212,11 +212,7 @@ impl DocParser {
212212 self . attribute . inline . push ( ( inline, path. span ( ) ) ) ;
213213 }
214214
215- fn parse_cfg < ' c , S : Stage > (
216- & mut self ,
217- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
218- args : & ArgParser < ' _ > ,
219- ) {
215+ fn parse_cfg < S : Stage > ( & mut self , cx : & mut AcceptContext < ' _ , ' _ , S > , args : & ArgParser ) {
220216 // This function replaces cases like `cfg(all())` with `true`.
221217 fn simplify_cfg ( cfg_entry : & mut CfgEntry ) {
222218 match cfg_entry {
@@ -236,11 +232,11 @@ impl DocParser {
236232 }
237233 }
238234
239- fn parse_auto_cfg < ' c , S : Stage > (
235+ fn parse_auto_cfg < S : Stage > (
240236 & mut self ,
241- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
242- path : & PathParser < ' _ > ,
243- args : & ArgParser < ' _ > ,
237+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
238+ path : & OwnedPathParser ,
239+ args : & ArgParser ,
244240 ) {
245241 match args {
246242 ArgParser :: NoArgs => {
@@ -343,10 +339,10 @@ impl DocParser {
343339 }
344340 }
345341
346- fn parse_single_doc_attr_item < ' c , S : Stage > (
342+ fn parse_single_doc_attr_item < S : Stage > (
347343 & mut self ,
348- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
349- mip : & MetaItemParser < ' _ > ,
344+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
345+ mip : & MetaItemParser ,
350346 ) {
351347 let path = mip. path ( ) ;
352348 let args = mip. args ( ) ;
@@ -506,10 +502,10 @@ impl DocParser {
506502 }
507503 }
508504
509- fn accept_single_doc_attr < ' c , S : Stage > (
505+ fn accept_single_doc_attr < S : Stage > (
510506 & mut self ,
511- cx : & ' c mut AcceptContext < ' _ , ' _ , S > ,
512- args : & ' c ArgParser < ' _ > ,
507+ cx : & mut AcceptContext < ' _ , ' _ , S > ,
508+ args : & ArgParser ,
513509 ) {
514510 match args {
515511 ArgParser :: NoArgs => {
0 commit comments