diff options
| author | bors <bors@rust-lang.org> | 2024-09-07 18:12:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-07 18:12:05 +0000 |
| commit | ec867f03bcd6c39156ef13eb5f85bf4fb924ca29 (patch) | |
| tree | 93b51c48db24efa58e43951970b0c3ae9c84b885 /compiler/rustc_trait_selection/src | |
| parent | 4ff16a97702f1764564139a8c4aaf7936e5d43e4 (diff) | |
| parent | 588dce14211bdfb1305c495f01c697e29e946e10 (diff) | |
| download | rust-ec867f03bcd6c39156ef13eb5f85bf4fb924ca29.tar.gz rust-ec867f03bcd6c39156ef13eb5f85bf4fb924ca29.zip | |
Auto merge of #126161 - Bryanskiy:delegation-generics-4, r=petrochenkov
Delegation: support generics in associated delegation items This is a continuation of https://github.com/rust-lang/rust/pull/125929. [design](https://github.com/Bryanskiy/posts/blob/master/delegation%20in%20generic%20contexts.md) Generic parameters inheritance was implemented in all contexts. Generic arguments are not yet supported. r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs index a93b633ce1a..cf9891f15ad 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/infer/need_type_info.rs @@ -1296,6 +1296,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())); |
