File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -285,10 +285,7 @@ impl<'a> base::Resolver for Resolver<'a> {
285285 -> Result < Option < Rc < SyntaxExtension > > , Determinacy > {
286286 let def = match invoc. kind {
287287 InvocationKind :: Attr { attr : None , .. } => return Ok ( None ) ,
288- _ => match self . resolve_invoc_to_def ( invoc, scope, force) {
289- Ok ( def) => def,
290- Err ( determinacy) => return Err ( determinacy) ,
291- } ,
288+ _ => self . resolve_invoc_to_def ( invoc, scope, force) ?,
292289 } ;
293290
294291 self . macro_defs . insert ( invoc. expansion_data . mark , def. def_id ( ) ) ;
Original file line number Diff line number Diff line change @@ -1249,10 +1249,7 @@ impl<'a> Parser<'a> {
12491249 let mac = respan ( lo. to ( self . prev_span ) , Mac_ { path : pth, tts : tts } ) ;
12501250 ( keywords:: Invalid . ident ( ) , ast:: TraitItemKind :: Macro ( mac) )
12511251 } else {
1252- let ( constness, unsafety, abi) = match self . parse_fn_front_matter ( ) {
1253- Ok ( cua) => cua,
1254- Err ( e) => return Err ( e) ,
1255- } ;
1252+ let ( constness, unsafety, abi) = self . parse_fn_front_matter ( ) ?;
12561253
12571254 let ident = self . parse_ident ( ) ?;
12581255 let mut generics = self . parse_generics ( ) ?;
Original file line number Diff line number Diff line change @@ -211,10 +211,7 @@ impl<T: Encodable> Encodable for P<[T]> {
211211
212212impl < T : Decodable > Decodable for P < [ T ] > {
213213 fn decode < D : Decoder > ( d : & mut D ) -> Result < P < [ T ] > , D :: Error > {
214- Ok ( P :: from_vec ( match Decodable :: decode ( d) {
215- Ok ( t) => t,
216- Err ( e) => return Err ( e)
217- } ) )
214+ Ok ( P :: from_vec ( Decodable :: decode ( d) ?) )
218215 }
219216}
220217
You can’t perform that action at this time.
0 commit comments