@@ -1815,8 +1815,7 @@ impl<'a> LoweringContext<'a> {
18151815 let match_expr = P ( self . expr_match ( e. span ,
18161816 into_iter_expr,
18171817 hir_vec ! [ iter_arm] ,
1818- hir:: MatchSource :: ForLoopDesugar ,
1819- ThinVec :: new ( ) ) ) ;
1818+ hir:: MatchSource :: ForLoopDesugar ) ) ;
18201819
18211820 // `{ let _result = ...; _result }`
18221821 // underscore prevents an unused_variables lint if the head diverges
@@ -1911,23 +1910,8 @@ impl<'a> LoweringContext<'a> {
19111910 self . arm ( hir_vec ! [ err_pat] , ret_expr)
19121911 } ;
19131912
1914- // #[allow(unreachable_patterns)]
1915- let match_attr = {
1916- // allow(unreachable_patterns)
1917- let allow = {
1918- let allow_ident = self . str_to_ident ( "allow" ) ;
1919- let up_ident = self . str_to_ident ( "unreachable_patterns" ) ;
1920- let up_meta_item = attr:: mk_spanned_word_item ( e. span , up_ident) ;
1921- let up_nested = NestedMetaItemKind :: MetaItem ( up_meta_item) ;
1922- let up_spanned = respan ( e. span , up_nested) ;
1923- attr:: mk_spanned_list_item ( e. span , allow_ident, vec ! [ up_spanned] )
1924- } ;
1925- attr:: mk_spanned_attr_outer ( e. span , attr:: mk_attr_id ( ) , allow)
1926- } ;
1927-
1928- let attrs = From :: from ( vec ! [ match_attr] ) ;
19291913 return self . expr_match ( e. span , discr, hir_vec ! [ err_arm, ok_arm] ,
1930- hir:: MatchSource :: TryDesugar , attrs ) ;
1914+ hir:: MatchSource :: TryDesugar ) ;
19311915 }
19321916
19331917 ExprKind :: Mac ( _) => panic ! ( "Shouldn't exist here" ) ,
@@ -2110,10 +2094,9 @@ impl<'a> LoweringContext<'a> {
21102094 span : Span ,
21112095 arg : P < hir:: Expr > ,
21122096 arms : hir:: HirVec < hir:: Arm > ,
2113- source : hir:: MatchSource ,
2114- attrs : ThinVec < Attribute > )
2097+ source : hir:: MatchSource )
21152098 -> hir:: Expr {
2116- self . expr ( span, hir:: ExprMatch ( arg, arms, source) , attrs )
2099+ self . expr ( span, hir:: ExprMatch ( arg, arms, source) , ThinVec :: new ( ) )
21172100 }
21182101
21192102 fn expr_block ( & mut self , b : P < hir:: Block > , attrs : ThinVec < Attribute > ) -> hir:: Expr {
0 commit comments