Delegation: support generics in associated delegation items
This commit is contained in:
parent
59885f5065
commit
588dce1421
14 changed files with 501 additions and 273 deletions
|
@ -1253,6 +1253,9 @@ impl<'a, 'tcx> Visitor<'tcx> for FindInferSourceVisitor<'a, 'tcx> {
|
|||
&& let Some(def_id) = self.typeck_results.type_dependent_def_id(expr.hir_id)
|
||||
&& self.tecx.tcx.trait_of_item(def_id).is_some()
|
||||
&& !has_impl_trait(def_id)
|
||||
// FIXME(fn_delegation): In delegation item argument spans are equal to last path
|
||||
// segment. This leads to ICE's when emitting `multipart_suggestion`.
|
||||
&& tcx.hir().opt_delegation_sig_id(expr.hir_id.owner.def_id).is_none()
|
||||
{
|
||||
let successor =
|
||||
method_args.get(0).map_or_else(|| (")", span.hi()), |arg| (", ", arg.span.lo()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue