Skip to content

Commit 3c1a561

Browse files
authored
Unrolled build for rust-lang#137529
Rollup merge of rust-lang#137529 - klensy:unused3, r=lcnr remove few unused args
2 parents a46c755 + 8467a76 commit 3c1a561

File tree

7 files changed

+9
-24
lines changed

7 files changed

+9
-24
lines changed

compiler/rustc_borrowck/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
648648
| StatementKind::StorageLive(..) => {}
649649
// This does not affect borrowck
650650
StatementKind::BackwardIncompatibleDropHint { place, reason: BackwardIncompatibleDropReason::Edition2024 } => {
651-
self.check_backward_incompatible_drop(location, (**place, span), state);
651+
self.check_backward_incompatible_drop(location, **place, state);
652652
}
653653
StatementKind::StorageDead(local) => {
654654
self.access_place(
@@ -1174,7 +1174,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
11741174
fn check_backward_incompatible_drop(
11751175
&mut self,
11761176
location: Location,
1177-
(place, place_span): (Place<'tcx>, Span),
1177+
place: Place<'tcx>,
11781178
state: &BorrowckDomain,
11791179
) {
11801180
let tcx = self.infcx.tcx;

compiler/rustc_hir_analysis/src/collect.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,6 @@ fn lower_variant<'tcx>(
10741074
def.ctor().map(|(kind, _, def_id)| (kind, def_id.to_def_id())),
10751075
discr,
10761076
fields,
1077-
adt_kind,
10781077
parent_did.to_def_id(),
10791078
recovered,
10801079
adt_kind == AdtKind::Struct && tcx.has_attr(parent_did, sym::non_exhaustive)

compiler/rustc_metadata/src/rmeta/decoder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,6 @@ impl<'a> CrateMetadataRef<'a> {
11161116
value: self.get_default_field(did.index),
11171117
})
11181118
.collect(),
1119-
adt_kind,
11201119
parent_did,
11211120
None,
11221121
data.is_non_exhaustive,

compiler/rustc_middle/src/ty/mod.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -1184,23 +1184,17 @@ impl VariantDef {
11841184
///
11851185
/// If someone speeds up attribute loading to not be a performance concern, they can
11861186
/// remove this hack and use the constructor `DefId` everywhere.
1187+
#[instrument(level = "debug")]
11871188
pub fn new(
11881189
name: Symbol,
11891190
variant_did: Option<DefId>,
11901191
ctor: Option<(CtorKind, DefId)>,
11911192
discr: VariantDiscr,
11921193
fields: IndexVec<FieldIdx, FieldDef>,
1193-
adt_kind: AdtKind,
11941194
parent_did: DefId,
11951195
recover_tainted: Option<ErrorGuaranteed>,
11961196
is_field_list_non_exhaustive: bool,
11971197
) -> Self {
1198-
debug!(
1199-
"VariantDef::new(name = {:?}, variant_did = {:?}, ctor = {:?}, discr = {:?},
1200-
fields = {:?}, adt_kind = {:?}, parent_did = {:?})",
1201-
name, variant_did, ctor, discr, fields, adt_kind, parent_did,
1202-
);
1203-
12041198
let mut flags = VariantFlags::NO_VARIANT_FLAGS;
12051199
if is_field_list_non_exhaustive {
12061200
flags |= VariantFlags::IS_FIELD_LIST_NON_EXHAUSTIVE;

compiler/rustc_monomorphize/src/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
751751
/// This does not walk the MIR of the constant as that is not needed for codegen, all we need is
752752
/// to ensure that the constant evaluates successfully and walk the result.
753753
#[instrument(skip(self), level = "debug")]
754-
fn visit_const_operand(&mut self, constant: &mir::ConstOperand<'tcx>, location: Location) {
754+
fn visit_const_operand(&mut self, constant: &mir::ConstOperand<'tcx>, _location: Location) {
755755
// No `super_constant` as we don't care about `visit_ty`/`visit_ty_const`.
756756
let Some(val) = self.eval_constant(constant) else { return };
757757
collect_const_value(self.tcx, val, self.used_items);

compiler/rustc_resolve/src/diagnostics.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
22522252
#[instrument(level = "debug", skip(self, parent_scope))]
22532253
pub(crate) fn make_path_suggestion(
22542254
&mut self,
2255-
span: Span,
22562255
mut path: Vec<Segment>,
22572256
parent_scope: &ParentScope<'ra>,
22582257
) -> Option<(Vec<Segment>, Option<String>)> {
@@ -2480,7 +2479,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
24802479
// or `use a::{b, c, d}};`
24812480
// ^^^^^^^^^^^
24822481
let (has_nested, after_crate_name) =
2483-
find_span_immediately_after_crate_name(self.tcx.sess, module_name, import.use_span);
2482+
find_span_immediately_after_crate_name(self.tcx.sess, import.use_span);
24842483
debug!(has_nested, ?after_crate_name);
24852484

24862485
let source_map = self.tcx.sess.source_map();
@@ -2687,11 +2686,7 @@ fn extend_span_to_previous_binding(sess: &Session, binding_span: Span) -> Option
26872686
/// // ^^^^^^^^^^^^^^^ -- true
26882687
/// ```
26892688
#[instrument(level = "debug", skip(sess))]
2690-
fn find_span_immediately_after_crate_name(
2691-
sess: &Session,
2692-
module_name: Symbol,
2693-
use_span: Span,
2694-
) -> (bool, Span) {
2689+
fn find_span_immediately_after_crate_name(sess: &Session, use_span: Span) -> (bool, Span) {
26952690
let source_map = sess.source_map();
26962691

26972692
// Using `use issue_59764::foo::{baz, makro};` as an example throughout..

compiler/rustc_resolve/src/imports.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
955955
} else {
956956
None
957957
};
958-
let err = match self.make_path_suggestion(
959-
span,
960-
import.module_path.clone(),
961-
&import.parent_scope,
962-
) {
958+
let err = match self
959+
.make_path_suggestion(import.module_path.clone(), &import.parent_scope)
960+
{
963961
Some((suggestion, note)) => UnresolvedImportError {
964962
span,
965963
label: None,

0 commit comments

Comments
 (0)