Skip to content

Commit 4897820

Browse files
Remove unused arguments
1 parent 54628c8 commit 4897820

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

src/librustc_typeck/check/compare_method.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ pub fn compare_impl_method<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
6868

6969
if let Err(ErrorReported) = compare_synthetic_generics(tcx,
7070
impl_m,
71-
impl_m_span,
72-
trait_m,
73-
trait_item_span) {
71+
trait_m) {
7472
return;
7573
}
7674

@@ -729,14 +727,11 @@ fn compare_number_of_method_arguments<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
729727

730728
fn compare_synthetic_generics<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
731729
impl_m: &ty::AssociatedItem,
732-
_impl_m_span: Span, // FIXME necessary?
733-
trait_m: &ty::AssociatedItem,
734-
_trait_item_span: Option<Span>) // FIXME necessary?
730+
trait_m: &ty::AssociatedItem)
735731
-> Result<(), ErrorReported> {
736732
// FIXME(chrisvittal) Clean up this function, list of FIXME items:
737733
// 1. Better messages for the span labels
738734
// 2. Explanation as to what is going on
739-
// 3. Correct the function signature for what we actually use
740735
// If we get here, we already have the same number of generics, so the zip will
741736
// be okay.
742737
let mut error_found = false;

src/librustc_typeck/coherence/builtin.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,19 @@ struct Checker<'a, 'tcx: 'a> {
4141

4242
impl<'a, 'tcx> Checker<'a, 'tcx> {
4343
fn check<F>(&self, trait_def_id: Option<DefId>, mut f: F) -> &Self
44-
where F: FnMut(TyCtxt<'a, 'tcx, 'tcx>, DefId, DefId)
44+
where F: FnMut(TyCtxt<'a, 'tcx, 'tcx>, DefId)
4545
{
4646
if Some(self.trait_def_id) == trait_def_id {
4747
for &impl_id in self.tcx.hir.trait_impls(self.trait_def_id) {
4848
let impl_def_id = self.tcx.hir.local_def_id(impl_id);
49-
f(self.tcx, self.trait_def_id, impl_def_id);
49+
f(self.tcx, impl_def_id);
5050
}
5151
}
5252
self
5353
}
5454
}
5555

56-
fn visit_implementation_of_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
57-
_drop_did: DefId,
58-
impl_did: DefId) {
56+
fn visit_implementation_of_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did: DefId) {
5957
match tcx.type_of(impl_did).sty {
6058
ty::TyAdt(..) => {}
6159
_ => {
@@ -87,9 +85,7 @@ fn visit_implementation_of_drop<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
8785
}
8886
}
8987

90-
fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
91-
_copy_did: DefId,
92-
impl_did: DefId) {
88+
fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did: DefId) {
9389
debug!("visit_implementation_of_copy: impl_did={:?}", impl_did);
9490

9591
let impl_node_id = if let Some(n) = tcx.hir.as_local_node_id(impl_did) {
@@ -157,9 +153,7 @@ fn visit_implementation_of_copy<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
157153
}
158154
}
159155

160-
fn visit_implementation_of_coerce_unsized<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
161-
_: DefId,
162-
impl_did: DefId) {
156+
fn visit_implementation_of_coerce_unsized<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_did: DefId) {
163157
debug!("visit_implementation_of_coerce_unsized: impl_did={:?}",
164158
impl_did);
165159

0 commit comments

Comments
 (0)