@@ -103,7 +103,7 @@ impl<'a> Parser<'a> {
103103 // If we captured tokens during parsing (due to outer attributes),
104104 // use those.
105105 if item. tokens . is_none ( ) {
106- item. tokens = Some ( tokens) ;
106+ item. tokens = tokens;
107107 }
108108 token:: NtItem ( item)
109109 }
@@ -115,7 +115,7 @@ impl<'a> Parser<'a> {
115115 let ( mut block, tokens) = self . collect_tokens ( |this| this. parse_block ( ) ) ?;
116116 // We have have eaten an NtBlock, which could already have tokens
117117 if block. tokens . is_none ( ) {
118- block. tokens = Some ( tokens) ;
118+ block. tokens = tokens;
119119 }
120120 token:: NtBlock ( block)
121121 }
@@ -124,7 +124,7 @@ impl<'a> Parser<'a> {
124124 match stmt {
125125 Some ( mut s) => {
126126 if s. tokens . is_none ( ) {
127- s. tokens = Some ( tokens) ;
127+ s. tokens = tokens;
128128 }
129129 token:: NtStmt ( s)
130130 }
@@ -137,7 +137,7 @@ impl<'a> Parser<'a> {
137137 let ( mut pat, tokens) = self . collect_tokens ( |this| this. parse_pat ( None ) ) ?;
138138 // We have have eaten an NtPat, which could already have tokens
139139 if pat. tokens . is_none ( ) {
140- pat. tokens = Some ( tokens) ;
140+ pat. tokens = tokens;
141141 }
142142 token:: NtPat ( pat)
143143 }
@@ -146,7 +146,7 @@ impl<'a> Parser<'a> {
146146 // If we captured tokens during parsing (due to outer attributes),
147147 // use those.
148148 if expr. tokens . is_none ( ) {
149- expr. tokens = Some ( tokens) ;
149+ expr. tokens = tokens;
150150 }
151151 token:: NtExpr ( expr)
152152 }
@@ -155,15 +155,15 @@ impl<'a> Parser<'a> {
155155 self . collect_tokens ( |this| this. parse_literal_maybe_minus ( ) ) ?;
156156 // We have have eaten a nonterminal, which could already have tokens
157157 if lit. tokens . is_none ( ) {
158- lit. tokens = Some ( tokens) ;
158+ lit. tokens = tokens;
159159 }
160160 token:: NtLiteral ( lit)
161161 }
162162 NonterminalKind :: Ty => {
163163 let ( mut ty, tokens) = self . collect_tokens ( |this| this. parse_ty ( ) ) ?;
164164 // We have an eaten an NtTy, which could already have tokens
165165 if ty. tokens . is_none ( ) {
166- ty. tokens = Some ( tokens) ;
166+ ty. tokens = tokens;
167167 }
168168 token:: NtTy ( ty)
169169 }
@@ -183,15 +183,15 @@ impl<'a> Parser<'a> {
183183 self . collect_tokens ( |this| this. parse_path ( PathStyle :: Type ) ) ?;
184184 // We have have eaten an NtPath, which could already have tokens
185185 if path. tokens . is_none ( ) {
186- path. tokens = Some ( tokens) ;
186+ path. tokens = tokens;
187187 }
188188 token:: NtPath ( path)
189189 }
190190 NonterminalKind :: Meta => {
191191 let ( mut attr, tokens) = self . collect_tokens ( |this| this. parse_attr_item ( false ) ) ?;
192192 // We may have eaten a nonterminal, which could already have tokens
193193 if attr. tokens . is_none ( ) {
194- attr. tokens = Some ( tokens) ;
194+ attr. tokens = tokens;
195195 }
196196 token:: NtMeta ( P ( attr) )
197197 }
@@ -201,7 +201,7 @@ impl<'a> Parser<'a> {
201201 self . collect_tokens ( |this| this. parse_visibility ( FollowedByType :: Yes ) ) ?;
202202 // We may have etan an `NtVis`, which could already have tokens
203203 if vis. tokens . is_none ( ) {
204- vis. tokens = Some ( tokens) ;
204+ vis. tokens = tokens;
205205 }
206206 token:: NtVis ( vis)
207207 }
0 commit comments