cleanup few unused args

This commit is contained in:
klensy 2025-02-24 12:19:52 +03:00
parent b6d3be4948
commit cede9029fd
4 changed files with 8 additions and 15 deletions

View File

@ -648,7 +648,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
| StatementKind::StorageLive(..) => {}
// This does not affect borrowck
StatementKind::BackwardIncompatibleDropHint { place, reason: BackwardIncompatibleDropReason::Edition2024 } => {
self.check_backward_incompatible_drop(location, (**place, span), state);
self.check_backward_incompatible_drop(location, **place, state);
}
StatementKind::StorageDead(local) => {
self.access_place(
@ -1174,7 +1174,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
fn check_backward_incompatible_drop(
&mut self,
location: Location,
(place, place_span): (Place<'tcx>, Span),
place: Place<'tcx>,
state: &BorrowckDomain,
) {
let tcx = self.infcx.tcx;

View File

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

View File

@ -2252,7 +2252,6 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
#[instrument(level = "debug", skip(self, parent_scope))]
pub(crate) fn make_path_suggestion(
&mut self,
span: Span,
mut path: Vec<Segment>,
parent_scope: &ParentScope<'ra>,
) -> Option<(Vec<Segment>, Option<String>)> {
@ -2480,7 +2479,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
// or `use a::{b, c, d}};`
// ^^^^^^^^^^^
let (has_nested, after_crate_name) =
find_span_immediately_after_crate_name(self.tcx.sess, module_name, import.use_span);
find_span_immediately_after_crate_name(self.tcx.sess, import.use_span);
debug!(has_nested, ?after_crate_name);
let source_map = self.tcx.sess.source_map();
@ -2687,11 +2686,7 @@ fn extend_span_to_previous_binding(sess: &Session, binding_span: Span) -> Option
/// // ^^^^^^^^^^^^^^^ -- true
/// ```
#[instrument(level = "debug", skip(sess))]
fn find_span_immediately_after_crate_name(
sess: &Session,
module_name: Symbol,
use_span: Span,
) -> (bool, Span) {
fn find_span_immediately_after_crate_name(sess: &Session, use_span: Span) -> (bool, Span) {
let source_map = sess.source_map();
// Using `use issue_59764::foo::{baz, makro};` as an example throughout..

View File

@ -955,11 +955,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
} else {
None
};
let err = match self.make_path_suggestion(
span,
import.module_path.clone(),
&import.parent_scope,
) {
let err = match self
.make_path_suggestion(import.module_path.clone(), &import.parent_scope)
{
Some((suggestion, note)) => UnresolvedImportError {
span,
label: None,