Skip to content

Commit f0e21ff

Browse files
committed
Remove unused fields in some structures
The dead_code lint was previously eroneously missing those. Since this lint bug has been fixed, the unused fields need to be removed.
1 parent f1ff461 commit f0e21ff

File tree

4 files changed

+2
-20
lines changed

4 files changed

+2
-20
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
20982098
from_closure: constraint.from_closure,
20992099
cause: ObligationCause::new(constraint.span, CRATE_DEF_ID, cause_code.clone()),
21002100
variance_info: constraint.variance_info,
2101-
outlives_constraint: *constraint,
21022101
})
21032102
.collect();
21042103
debug!("categorized_path={:#?}", categorized_path);
@@ -2327,5 +2326,4 @@ pub struct BlameConstraint<'tcx> {
23272326
pub from_closure: bool,
23282327
pub cause: ObligationCause<'tcx>,
23292328
pub variance_info: ty::VarianceDiagInfo<'tcx>,
2330-
pub outlives_constraint: OutlivesConstraint<'tcx>,
23312329
}

compiler/rustc_codegen_gcc/src/context.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ pub struct CodegenCx<'gcc, 'tcx> {
106106
local_gen_sym_counter: Cell<usize>,
107107

108108
eh_personality: Cell<Option<RValue<'gcc>>>,
109-
pub rust_try_fn: Cell<Option<(Type<'gcc>, Function<'gcc>)>>,
110109

111110
pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
112111

@@ -116,8 +115,6 @@ pub struct CodegenCx<'gcc, 'tcx> {
116115
/// they can be dereferenced later.
117116
/// FIXME(antoyo): fix the rustc API to avoid having this hack.
118117
pub structs_as_pointer: RefCell<FxHashSet<RValue<'gcc>>>,
119-
120-
pub cleanup_blocks: RefCell<FxHashSet<Block<'gcc>>>,
121118
}
122119

123120
impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
@@ -269,10 +266,8 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
269266
struct_types: Default::default(),
270267
local_gen_sym_counter: Cell::new(0),
271268
eh_personality: Cell::new(None),
272-
rust_try_fn: Cell::new(None),
273269
pointee_infos: Default::default(),
274270
structs_as_pointer: Default::default(),
275-
cleanup_blocks: Default::default(),
276271
};
277272
// TODO(antoyo): instead of doing this, add SsizeT to libgccjit.
278273
cx.isize_type = usize_type.to_signed(&cx);

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ use rustc_session::config::{CrateType, DebugInfo, PAuthKey, PacRet};
2727
use rustc_session::Session;
2828
use rustc_span::source_map::Spanned;
2929
use rustc_span::Span;
30-
use rustc_target::abi::{
31-
call::FnAbi, HasDataLayout, PointeeInfo, Size, TargetDataLayout, VariantIdx,
32-
};
30+
use rustc_target::abi::{call::FnAbi, HasDataLayout, TargetDataLayout, VariantIdx};
3331
use rustc_target::spec::{HasTargetSpec, RelocModel, Target, TlsModel};
3432
use smallvec::SmallVec;
3533

@@ -82,7 +80,6 @@ pub struct CodegenCx<'ll, 'tcx> {
8280
/// Mapping of scalar types to llvm types.
8381
pub scalar_lltypes: RefCell<FxHashMap<Ty<'tcx>, &'ll Type>>,
8482

85-
pub pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>,
8683
pub isize_ty: &'ll Type,
8784

8885
pub coverage_cx: Option<coverageinfo::CrateCoverageContext<'ll, 'tcx>>,
@@ -487,7 +484,6 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
487484
compiler_used_statics: RefCell::new(Vec::new()),
488485
type_lowering: Default::default(),
489486
scalar_lltypes: Default::default(),
490-
pointee_infos: Default::default(),
491487
isize_ty,
492488
coverage_cx,
493489
dbg_cx,

library/test/src/console.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub struct ConsoleTestDiscoveryState {
4646
pub tests: usize,
4747
pub benchmarks: usize,
4848
pub ignored: usize,
49-
pub options: Options,
5049
}
5150

5251
impl ConsoleTestDiscoveryState {
@@ -56,13 +55,7 @@ impl ConsoleTestDiscoveryState {
5655
None => None,
5756
};
5857

59-
Ok(ConsoleTestDiscoveryState {
60-
log_out,
61-
tests: 0,
62-
benchmarks: 0,
63-
ignored: 0,
64-
options: opts.options,
65-
})
58+
Ok(ConsoleTestDiscoveryState { log_out, tests: 0, benchmarks: 0, ignored: 0 })
6659
}
6760

6861
pub fn write_log<F, S>(&mut self, msg: F) -> io::Result<()>

0 commit comments

Comments
 (0)