2323 return Ok ( ast:: Expression :: Inline (
2424 exp,
2525 #[ cfg( feature = "spans" ) ]
26- ast:: Span :: new ( start_span..self . ptr ) ,
26+ ast:: Span ( start_span..self . ptr ) ,
2727 ) ) ;
2828 }
2929
6868 selector : exp,
6969 variants,
7070 #[ cfg( feature = "spans" ) ]
71- span : ast:: Span :: new ( start_span..self . ptr ) ,
71+ span : ast:: Span ( start_span..self . ptr ) ,
7272 } )
7373 }
7474
@@ -112,15 +112,15 @@ where
112112 Ok ( ast:: InlineExpression :: StringLiteral {
113113 value : slice,
114114 #[ cfg( feature = "spans" ) ]
115- span : ast:: Span :: new ( start..self . ptr ) ,
115+ span : ast:: Span ( start..self . ptr ) ,
116116 } )
117117 }
118118 Some ( b) if b. is_ascii_digit ( ) => {
119119 let num = self . get_number_literal ( ) ?;
120120 Ok ( ast:: InlineExpression :: NumberLiteral {
121121 value : num,
122122 #[ cfg( feature = "spans" ) ]
123- span : ast:: Span :: new ( start..self . ptr ) ,
123+ span : ast:: Span ( start..self . ptr ) ,
124124 } )
125125 }
126126 Some ( b'-' ) if !only_literal => {
@@ -135,15 +135,15 @@ where
135135 attribute,
136136 arguments,
137137 #[ cfg( feature = "spans" ) ]
138- span : ast:: Span :: new ( start..self . ptr ) ,
138+ span : ast:: Span ( start..self . ptr ) ,
139139 } )
140140 } else {
141141 self . ptr -= 1 ;
142142 let num = self . get_number_literal ( ) ?;
143143 Ok ( ast:: InlineExpression :: NumberLiteral {
144144 value : num,
145145 #[ cfg( feature = "spans" ) ]
146- span : ast:: Span :: new ( start..self . ptr ) ,
146+ span : ast:: Span ( start..self . ptr ) ,
147147 } )
148148 }
149149 }
@@ -153,7 +153,7 @@ where
153153 Ok ( ast:: InlineExpression :: VariableReference {
154154 id,
155155 #[ cfg( feature = "spans" ) ]
156- span : ast:: Span :: new ( start..self . ptr ) ,
156+ span : ast:: Span ( start..self . ptr ) ,
157157 } )
158158 }
159159 Some ( b) if b. is_ascii_alphabetic ( ) => {
@@ -169,15 +169,15 @@ where
169169 id,
170170 arguments,
171171 #[ cfg( feature = "spans" ) ]
172- span : ast:: Span :: new ( start..self . ptr ) ,
172+ span : ast:: Span ( start..self . ptr ) ,
173173 } )
174174 } else {
175175 let attribute = self . get_attribute_accessor ( ) ?;
176176 Ok ( ast:: InlineExpression :: MessageReference {
177177 id,
178178 attribute,
179179 #[ cfg( feature = "spans" ) ]
180- span : ast:: Span :: new ( start..self . ptr ) ,
180+ span : ast:: Span ( start..self . ptr ) ,
181181 } )
182182 }
183183 }
@@ -187,7 +187,7 @@ where
187187 Ok ( ast:: InlineExpression :: Placeable {
188188 expression : Box :: new ( exp) ,
189189 #[ cfg( feature = "spans" ) ]
190- span : ast:: Span :: new ( start..self . ptr ) ,
190+ span : ast:: Span ( start..self . ptr ) ,
191191 } )
192192 }
193193 _ if only_literal => error ! ( ErrorKind :: ExpectedLiteral , self . ptr) ,
@@ -239,11 +239,11 @@ where
239239 name : ast:: Identifier {
240240 name : id. name . clone ( ) ,
241241 #[ cfg( feature = "spans" ) ]
242- span : id. span ,
242+ span : id. span . clone ( ) ,
243243 } ,
244244 value : val,
245245 #[ cfg( feature = "spans" ) ]
246- span : ast:: Span :: new ( id. span . start ..self . ptr ) ,
246+ span : ast:: Span ( id. span . start ..self . ptr ) ,
247247 } ) ;
248248 } else {
249249 if !argument_names. is_empty ( ) {
@@ -269,7 +269,7 @@ where
269269 positional,
270270 named,
271271 #[ cfg( feature = "spans" ) ]
272- span : ast:: Span :: new ( start..self . ptr ) ,
272+ span : ast:: Span ( start..self . ptr ) ,
273273 } ) )
274274 }
275275}
0 commit comments