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<()> {
765
765
parallel ! (
766
766
{
767
767
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) )
769
769
} ) ;
770
770
} ,
771
771
{
Original file line number Diff line number Diff line change @@ -1114,9 +1114,9 @@ rustc_queries! {
1114
1114
desc { "converting literal to mir constant" }
1115
1115
}
1116
1116
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 }
1120
1120
}
1121
1121
1122
1122
/// 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::{
14
14
} ;
15
15
use rustc_hir as hir;
16
16
use rustc_hir:: def:: * ;
17
- use rustc_hir:: def_id:: DefId ;
17
+ use rustc_hir:: def_id:: LocalDefId ;
18
18
use rustc_hir:: intravisit:: { self , Visitor } ;
19
19
use rustc_hir:: { HirId , Pat } ;
20
20
use rustc_middle:: ty:: print:: with_no_trimmed_paths;
@@ -27,12 +27,8 @@ use rustc_session::Session;
27
27
use rustc_span:: source_map:: Spanned ;
28
28
use rustc_span:: { BytePos , Span } ;
29
29
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) ;
36
32
let pattern_arena = TypedArena :: default ( ) ;
37
33
let mut visitor = MatchVisitor {
38
34
tcx,
You can’t perform that action at this time.
0 commit comments