librustc: De-@mut
the crate context's do_not_commit_warning_issued
This commit is contained in:
parent
61768de5e9
commit
2418cc0212
@ -307,8 +307,8 @@ impl FunctionContext {
|
||||
}
|
||||
|
||||
pub fn warn_not_to_commit(ccx: &mut CrateContext, msg: &str) {
|
||||
if !ccx.do_not_commit_warning_issued {
|
||||
ccx.do_not_commit_warning_issued = true;
|
||||
if !ccx.do_not_commit_warning_issued.get() {
|
||||
ccx.do_not_commit_warning_issued.set(true);
|
||||
ccx.sess.warn(msg.to_str() + " -- do not commit like this!");
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ pub struct CrateContext {
|
||||
// is not emitted by LLVM's GC pass when no functions use GC.
|
||||
uses_gc: bool,
|
||||
dbg_cx: Option<debuginfo::CrateDebugContext>,
|
||||
do_not_commit_warning_issued: bool
|
||||
do_not_commit_warning_issued: Cell<bool>,
|
||||
}
|
||||
|
||||
impl CrateContext {
|
||||
@ -232,7 +232,7 @@ impl CrateContext {
|
||||
crate_map_name: crate_map_name,
|
||||
uses_gc: false,
|
||||
dbg_cx: dbg_cx,
|
||||
do_not_commit_warning_issued: false
|
||||
do_not_commit_warning_issued: Cell::new(false),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user