Skip to content

Commit

Permalink
Add some FIXMEs for follow-up PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
fmease committed Feb 19, 2023
1 parent 00b976a commit f2253da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_hir_analysis/src/astconv/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
fulfillment_errors: Vec<FulfillmentError<'tcx>>,
span: Span,
) -> ErrorGuaranteed {
// FIXME(fmease): This was copied in parts from an old version of `rustc_hir_typeck::method::suggest`.
// Either
// * update this code by applying changes similar to #106702 or by taking a
// Vec<(DefId, (DefId, DefId), Option<Vec<FulfillmentError<'tcx>>>)> or
// * deduplicate this code across the two crates.

let tcx = self.tcx();

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

let mut bound_spans = Vec::new();

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

// FIXME(fmease): Copied from `rustc_hir_typeck::method::probe`. Deduplicate.
let format_pred = |pred: ty::Predicate<'tcx>| {
let bound_predicate = pred.kind();
match bound_predicate.skip_binder() {
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_hir_analysis/src/astconv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2284,8 +2284,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
if let Some((assoc_item, def_scope, impl_substs)) = applicable_candidates.pop() {
self.check_assoc_ty(assoc_item, name, def_scope, block, span);

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

let item_substs =
self.create_substs_for_associated_item(span, assoc_item, segment, impl_substs);
Expand Down

0 comments on commit f2253da

Please sign in to comment.