Skip to content

Commit cede902

Browse files
committed
cleanup few unused args
1 parent b6d3be4 commit cede902

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 2 additions & 2 deletions
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_monomorphize/src/collector.rs

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

compiler/rustc_resolve/src/diagnostics.rs

Lines changed: 2 additions & 7 deletions
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

Lines changed: 3 additions & 5 deletions
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)