@@ -1815,8 +1815,7 @@ impl<'a> LoweringContext<'a> {
1815
1815
let match_expr = P ( self . expr_match ( e. span ,
1816
1816
into_iter_expr,
1817
1817
hir_vec ! [ iter_arm] ,
1818
- hir:: MatchSource :: ForLoopDesugar ,
1819
- ThinVec :: new ( ) ) ) ;
1818
+ hir:: MatchSource :: ForLoopDesugar ) ) ;
1820
1819
1821
1820
// `{ let _result = ...; _result }`
1822
1821
// underscore prevents an unused_variables lint if the head diverges
@@ -1911,23 +1910,8 @@ impl<'a> LoweringContext<'a> {
1911
1910
self . arm ( hir_vec ! [ err_pat] , ret_expr)
1912
1911
} ;
1913
1912
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] ) ;
1929
1913
return self . expr_match ( e. span , discr, hir_vec ! [ err_arm, ok_arm] ,
1930
- hir:: MatchSource :: TryDesugar , attrs ) ;
1914
+ hir:: MatchSource :: TryDesugar ) ;
1931
1915
}
1932
1916
1933
1917
ExprKind :: Mac ( _) => panic ! ( "Shouldn't exist here" ) ,
@@ -2110,10 +2094,9 @@ impl<'a> LoweringContext<'a> {
2110
2094
span : Span ,
2111
2095
arg : P < hir:: Expr > ,
2112
2096
arms : hir:: HirVec < hir:: Arm > ,
2113
- source : hir:: MatchSource ,
2114
- attrs : ThinVec < Attribute > )
2097
+ source : hir:: MatchSource )
2115
2098
-> hir:: Expr {
2116
- self . expr ( span, hir:: ExprMatch ( arg, arms, source) , attrs )
2099
+ self . expr ( span, hir:: ExprMatch ( arg, arms, source) , ThinVec :: new ( ) )
2117
2100
}
2118
2101
2119
2102
fn expr_block ( & mut self , b : P < hir:: Block > , attrs : ThinVec < Attribute > ) -> hir:: Expr {
0 commit comments