Skip to content

Commit f2253da

Browse files
committed
Add some FIXMEs for follow-up PRs
1 parent 00b976a commit f2253da

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

compiler/rustc_hir_analysis/src/astconv/errors.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
291291
fulfillment_errors: Vec<FulfillmentError<'tcx>>,
292292
span: Span,
293293
) -> ErrorGuaranteed {
294+
// FIXME(fmease): This was copied in parts from an old version of `rustc_hir_typeck::method::suggest`.
295+
// Either
296+
// * update this code by applying changes similar to #106702 or by taking a
297+
// Vec<(DefId, (DefId, DefId), Option<Vec<FulfillmentError<'tcx>>>)> or
298+
// * deduplicate this code across the two crates.
299+
294300
let tcx = self.tcx();
295301

296302
let adt_did = self_ty.ty_adt_def().map(|def| def.did());
@@ -338,7 +344,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
338344

339345
let mut bound_spans = Vec::new();
340346

341-
// FIXME(fmease): Copied from `rustc_hir_typeck::method::probe`. Deduplicate.
342347
let mut bound_span_label = |self_ty: Ty<'_>, obligation: &str, quiet: &str| {
343348
let msg = format!(
344349
"doesn't satisfy `{}`",
@@ -367,7 +372,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
367372
}
368373
};
369374

370-
// FIXME(fmease): Copied from `rustc_hir_typeck::method::probe`. Deduplicate.
371375
let format_pred = |pred: ty::Predicate<'tcx>| {
372376
let bound_predicate = pred.kind();
373377
match bound_predicate.skip_binder() {

compiler/rustc_hir_analysis/src/astconv/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2284,8 +2284,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
22842284
if let Some((assoc_item, def_scope, impl_substs)) = applicable_candidates.pop() {
22852285
self.check_assoc_ty(assoc_item, name, def_scope, block, span);
22862286

2287-
// FIXME(inherent_associated_types): To fully *confirm* the *probed* candidate,
2288-
// we still need to register region obligations for regionck to prove/disprove.
2287+
// FIXME(inherent_associated_types): To fully *confirm* the *probed* candidate, we still
2288+
// need to relate the Self-type with fresh item substs & register region obligations for
2289+
// regionck to prove/disprove.
22892290

22902291
let item_substs =
22912292
self.create_substs_for_associated_item(span, assoc_item, segment, impl_substs);

0 commit comments

Comments
 (0)