@@ -53,7 +53,7 @@ impl<'tcx> HasDepContext for QueryCtxt<'tcx> {
53
53
}
54
54
55
55
impl QueryContext for QueryCtxt < ' _ > {
56
- fn next_job_id ( & self ) -> QueryJobId {
56
+ fn next_job_id ( self ) -> QueryJobId {
57
57
QueryJobId (
58
58
NonZeroU64 :: new (
59
59
self . queries . jobs . fetch_add ( 1 , rustc_data_structures:: sync:: Ordering :: Relaxed ) ,
@@ -62,31 +62,31 @@ impl QueryContext for QueryCtxt<'_> {
62
62
)
63
63
}
64
64
65
- fn current_query_job ( & self ) -> Option < QueryJobId > {
66
- tls:: with_related_context ( * * self , |icx| icx. query )
65
+ fn current_query_job ( self ) -> Option < QueryJobId > {
66
+ tls:: with_related_context ( * self , |icx| icx. query )
67
67
}
68
68
69
- fn try_collect_active_jobs ( & self ) -> Option < QueryMap < DepKind > > {
70
- self . queries . try_collect_active_jobs ( * * self )
69
+ fn try_collect_active_jobs ( self ) -> Option < QueryMap < DepKind > > {
70
+ self . queries . try_collect_active_jobs ( * self )
71
71
}
72
72
73
73
// Interactions with on_disk_cache
74
- fn load_side_effects ( & self , prev_dep_node_index : SerializedDepNodeIndex ) -> QuerySideEffects {
74
+ fn load_side_effects ( self , prev_dep_node_index : SerializedDepNodeIndex ) -> QuerySideEffects {
75
75
self . queries
76
76
. on_disk_cache
77
77
. as_ref ( )
78
- . map ( |c| c. load_side_effects ( * * self , prev_dep_node_index) )
78
+ . map ( |c| c. load_side_effects ( * self , prev_dep_node_index) )
79
79
. unwrap_or_default ( )
80
80
}
81
81
82
- fn store_side_effects ( & self , dep_node_index : DepNodeIndex , side_effects : QuerySideEffects ) {
82
+ fn store_side_effects ( self , dep_node_index : DepNodeIndex , side_effects : QuerySideEffects ) {
83
83
if let Some ( c) = self . queries . on_disk_cache . as_ref ( ) {
84
84
c. store_side_effects ( dep_node_index, side_effects)
85
85
}
86
86
}
87
87
88
88
fn store_side_effects_for_anon_node (
89
- & self ,
89
+ self ,
90
90
dep_node_index : DepNodeIndex ,
91
91
side_effects : QuerySideEffects ,
92
92
) {
@@ -100,7 +100,7 @@ impl QueryContext for QueryCtxt<'_> {
100
100
/// captured during execution and the actual result.
101
101
#[ inline( always) ]
102
102
fn start_query < R > (
103
- & self ,
103
+ self ,
104
104
token : QueryJobId ,
105
105
depth_limit : bool ,
106
106
diagnostics : Option < & Lock < ThinVec < Diagnostic > > > ,
@@ -109,14 +109,14 @@ impl QueryContext for QueryCtxt<'_> {
109
109
// The `TyCtxt` stored in TLS has the same global interner lifetime
110
110
// as `self`, so we use `with_related_context` to relate the 'tcx lifetimes
111
111
// when accessing the `ImplicitCtxt`.
112
- tls:: with_related_context ( * * self , move |current_icx| {
112
+ tls:: with_related_context ( * self , move |current_icx| {
113
113
if depth_limit && !self . recursion_limit ( ) . value_within_limit ( current_icx. query_depth ) {
114
114
self . depth_limit_error ( token) ;
115
115
}
116
116
117
117
// Update the `ImplicitCtxt` to point to our new query job.
118
118
let new_icx = ImplicitCtxt {
119
- tcx : * * self ,
119
+ tcx : * self ,
120
120
query : Some ( token) ,
121
121
diagnostics,
122
122
query_depth : current_icx. query_depth + depth_limit as usize ,
@@ -130,7 +130,7 @@ impl QueryContext for QueryCtxt<'_> {
130
130
} )
131
131
}
132
132
133
- fn depth_limit_error ( & self , job : QueryJobId ) {
133
+ fn depth_limit_error ( self , job : QueryJobId ) {
134
134
let mut span = None ;
135
135
let mut layout_of_depth = None ;
136
136
if let Some ( map) = self . try_collect_active_jobs ( ) {
0 commit comments