From 4a0c2b2aba04f07b4351e3be93fb48460bf20dba Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Mon, 7 Mar 2022 17:17:15 -0500 Subject: [PATCH] Add a FIXME explaining how one could go about fixing this code to bring it in sync with the method added in PR 94584. --- compiler/rustc_typeck/src/check/method/suggest.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_typeck/src/check/method/suggest.rs b/compiler/rustc_typeck/src/check/method/suggest.rs index 1a345a303ca..cdad00d3c06 100644 --- a/compiler/rustc_typeck/src/check/method/suggest.rs +++ b/compiler/rustc_typeck/src/check/method/suggest.rs @@ -1936,6 +1936,10 @@ pub fn all_traits(tcx: TyCtxt<'_>) -> Vec { } fn find_use_placement<'tcx>(tcx: TyCtxt<'tcx>, target_module: LocalDefId) -> (Option, bool) { + // FIXME(#94854): this code uses an out-of-date method for inferring a span + // to suggest. It would be better to thread the ModSpans from the AST into + // the HIR, and then use that to drive the suggestion here. + let mut span = None; let mut found_use = false; let (module, _, _) = tcx.hir().get_module(target_module);