Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 64c61a3

Browse files
jam1garnernikomatsakis
authored andcommitted
Fix future_prelude_collision adding unneeded generic arguments
1 parent 4a21a0b commit 64c61a3

File tree

1 file changed

+1
-16
lines changed
  • compiler/rustc_typeck/src/check/method

1 file changed

+1
-16
lines changed

compiler/rustc_typeck/src/check/method/mod.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -210,22 +210,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
210210
call_expr.span,
211211
|lint| {
212212
let sp = call_expr.span;
213-
let type_name = self.tcx.def_path_str(pick.item.container.id());
214-
let type_generics = self.tcx.generics_of(pick.item.container.id());
215-
let parameter_count =
216-
type_generics.count() - (type_generics.has_self as usize);
217-
let trait_name = if parameter_count == 0 {
218-
type_name
219-
} else {
220-
format!(
221-
"{}<{}>",
222-
type_name,
223-
std::iter::repeat("_")
224-
.take(parameter_count)
225-
.collect::<Vec<_>>()
226-
.join(", ")
227-
)
228-
};
213+
let trait_name = self.tcx.def_path_str(pick.item.container.id());
229214

230215
let mut lint = lint.build(&format!(
231216
"trait method `{}` will become ambiguous in Rust 2021",

0 commit comments

Comments
 (0)