Skip to content

Commit a951158

Browse files
committed
Auto merge of #119552 - krtab:dead_code_priv_mod_pub_field, r=cjgillot,saethlin
Replace visibility test with reachability test in dead code detection Fixes #119545 Also included is a fix for an error now flagged by the lint
2 parents 83eaede + a64942a commit a951158

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/context.rs

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
110110
local_gen_sym_counter: Cell<usize>,
111111

112112
eh_personality: Cell<Option<RValue<'gcc>>>,
113+
#[cfg(feature="master")]
113114
pub rust_try_fn: Cell<Option<(Type<'gcc>, Function<'gcc>)>>,
114115

115116
pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
@@ -121,6 +122,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
121122
/// FIXME(antoyo): fix the rustc API to avoid having this hack.
122123
pub structs_as_pointer: RefCell<FxHashSet<RValue<'gcc>>>,
123124

125+
#[cfg(feature="master")]
124126
pub cleanup_blocks: RefCell<FxHashSet<Block<'gcc>>>,
125127
}
126128

@@ -325,9 +327,11 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
325327
struct_types: Default::default(),
326328
local_gen_sym_counter: Cell::new(0),
327329
eh_personality: Cell::new(None),
330+
#[cfg(feature="master")]
328331
rust_try_fn: Cell::new(None),
329332
pointee_infos: Default::default(),
330333
structs_as_pointer: Default::default(),
334+
#[cfg(feature="master")]
331335
cleanup_blocks: Default::default(),
332336
};
333337
// TODO(antoyo): instead of doing this, add SsizeT to libgccjit.

0 commit comments

Comments
 (0)