diff options
| author | jam1garner <8260240+jam1garner@users.noreply.github.com> | 2021-05-28 00:55:32 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2021-06-14 13:27:25 -0400 |
| commit | 64c61a32f6051fe769928b09bfb6e829b74d6f5e (patch) | |
| tree | 34ee489cf7daeccb3667875e479d011dc74b662f | |
| parent | 4a21a0bebc0493c963525d827c34e62a726be249 (diff) | |
Fix `future_prelude_collision` adding unneeded generic arguments
| -rw-r--r-- | compiler/rustc_typeck/src/check/method/mod.rs | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/compiler/rustc_typeck/src/check/method/mod.rs b/compiler/rustc_typeck/src/check/method/mod.rs index 2198455c163..4a855d6e408 100644 --- a/compiler/rustc_typeck/src/check/method/mod.rs +++ b/compiler/rustc_typeck/src/check/method/mod.rs @@ -210,22 +210,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { call_expr.span, |lint| { let sp = call_expr.span; - let type_name = self.tcx.def_path_str(pick.item.container.id()); - let type_generics = self.tcx.generics_of(pick.item.container.id()); - let parameter_count = - type_generics.count() - (type_generics.has_self as usize); - let trait_name = if parameter_count == 0 { - type_name - } else { - format!( - "{}<{}>", - type_name, - std::iter::repeat("_") - .take(parameter_count) - .collect::<Vec<_>>() - .join(", ") - ) - }; + let trait_name = self.tcx.def_path_str(pick.item.container.id()); let mut lint = lint.build(&format!( "trait method `{}` will become ambiguous in Rust 2021", |
