File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
rustc_mir_build/src/thir/pattern Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
765765 parallel ! (
766766 {
767767 sess. time( "match_checking" , || {
768- tcx. hir( ) . par_body_owners( |def_id| tcx. ensure( ) . check_match( def_id. to_def_id ( ) ) )
768+ tcx. hir( ) . par_body_owners( |def_id| tcx. ensure( ) . check_match( def_id) )
769769 } ) ;
770770 } ,
771771 {
Original file line number Diff line number Diff line change @@ -1114,9 +1114,9 @@ rustc_queries! {
11141114 desc { "converting literal to mir constant" }
11151115 }
11161116
1117- query check_match( key: DefId ) {
1118- desc { |tcx| "match-checking `{}`" , tcx. def_path_str( key) }
1119- cache_on_disk_if { key . is_local ( ) }
1117+ query check_match( key: LocalDefId ) {
1118+ desc { |tcx| "match-checking `{}`" , tcx. def_path_str( key. to_def_id ( ) ) }
1119+ cache_on_disk_if { true }
11201120 }
11211121
11221122 /// Performs part of the privacy check and computes effective visibilities.
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use rustc_errors::{
1414} ;
1515use rustc_hir as hir;
1616use rustc_hir:: def:: * ;
17- use rustc_hir:: def_id:: DefId ;
17+ use rustc_hir:: def_id:: LocalDefId ;
1818use rustc_hir:: intravisit:: { self , Visitor } ;
1919use rustc_hir:: { HirId , Pat } ;
2020use rustc_middle:: ty:: print:: with_no_trimmed_paths;
@@ -27,12 +27,8 @@ use rustc_session::Session;
2727use rustc_span:: source_map:: Spanned ;
2828use rustc_span:: { BytePos , Span } ;
2929
30- pub ( crate ) fn check_match ( tcx : TyCtxt < ' _ > , def_id : DefId ) {
31- let body_id = match def_id. as_local ( ) {
32- None => return ,
33- Some ( def_id) => tcx. hir ( ) . body_owned_by ( def_id) ,
34- } ;
35-
30+ pub ( crate ) fn check_match ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) {
31+ let body_id = tcx. hir ( ) . body_owned_by ( def_id) ;
3632 let pattern_arena = TypedArena :: default ( ) ;
3733 let mut visitor = MatchVisitor {
3834 tcx,
You can’t perform that action at this time.
0 commit comments