Skip to content

Commit 549f08f

Browse files
committed
Mark codegen_gcc fields used only on feature master as such
The dead_code lint was previously eroneously missing those. Since this lint bug has been fixed, the unused fields need to be feature gated.
1 parent 57bc6e1 commit 549f08f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_codegen_gcc/src/context.rs

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

108108
eh_personality: Cell<Option<RValue<'gcc>>>,
109+
#[cfg(feature="master")]
109110
pub rust_try_fn: Cell<Option<(Type<'gcc>, Function<'gcc>)>>,
110111

111112
pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
@@ -117,6 +118,7 @@ pub struct CodegenCx<'gcc, 'tcx> {
117118
/// FIXME(antoyo): fix the rustc API to avoid having this hack.
118119
pub structs_as_pointer: RefCell<FxHashSet<RValue<'gcc>>>,
119120

121+
#[cfg(feature="master")]
120122
pub cleanup_blocks: RefCell<FxHashSet<Block<'gcc>>>,
121123
}
122124

@@ -269,9 +271,11 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
269271
struct_types: Default::default(),
270272
local_gen_sym_counter: Cell::new(0),
271273
eh_personality: Cell::new(None),
274+
#[cfg(feature="master")]
272275
rust_try_fn: Cell::new(None),
273276
pointee_infos: Default::default(),
274277
structs_as_pointer: Default::default(),
278+
#[cfg(feature="master")]
275279
cleanup_blocks: Default::default(),
276280
};
277281
// TODO(antoyo): instead of doing this, add SsizeT to libgccjit.

0 commit comments

Comments
 (0)