@@ -66,11 +66,11 @@ pub struct FnCtxt<'a, 'tcx> {
6666 pub ( super ) in_tail_expr : bool ,
6767
6868 /// First span of a return site that we find. Used in error messages.
69- pub ( super ) ret_coercion_span : RefCell < Option < Span > > ,
69+ pub ( super ) ret_coercion_span : Cell < Option < Span > > ,
7070
7171 pub ( super ) resume_yield_tys : Option < ( Ty < ' tcx > , Ty < ' tcx > ) > ,
7272
73- pub ( super ) ps : RefCell < UnsafetyState > ,
73+ pub ( super ) ps : Cell < UnsafetyState > ,
7474
7575 /// Whether the last checked node generates a divergence (e.g.,
7676 /// `return` will set this to `Always`). In general, when entering
@@ -127,9 +127,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
127127 ret_coercion_impl_trait : None ,
128128 ret_type_span : None ,
129129 in_tail_expr : false ,
130- ret_coercion_span : RefCell :: new ( None ) ,
130+ ret_coercion_span : Cell :: new ( None ) ,
131131 resume_yield_tys : None ,
132- ps : RefCell :: new ( UnsafetyState :: function ( hir:: Unsafety :: Normal , hir:: CRATE_HIR_ID ) ) ,
132+ ps : Cell :: new ( UnsafetyState :: function ( hir:: Unsafety :: Normal , hir:: CRATE_HIR_ID ) ) ,
133133 diverges : Cell :: new ( Diverges :: Maybe ) ,
134134 has_errors : Cell :: new ( false ) ,
135135 enclosing_breakables : RefCell :: new ( EnclosingBreakables {
0 commit comments