about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2022-03-07 17:17:15 -0500
committerFelix S. Klock II <pnkfelix@pnkfx.org>2022-03-07 17:17:15 -0500
commit4a0c2b2aba04f07b4351e3be93fb48460bf20dba (patch)
tree77829afddc2a48e184be0ba2efae49193094705d
parent673640d26de07e37ba34f6f77542f822fa72d54e (diff)
downloadrust-4a0c2b2aba04f07b4351e3be93fb48460bf20dba.tar.gz
rust-4a0c2b2aba04f07b4351e3be93fb48460bf20dba.zip
Add a FIXME explaining how one could go about fixing this code to bring it in
sync with the method added in PR 94584.
-rw-r--r--compiler/rustc_typeck/src/check/method/suggest.rs4
1 files changed, 4 insertions, 0 deletions
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<TraitInfo> {
 }
 
 fn find_use_placement<'tcx>(tcx: TyCtxt<'tcx>, target_module: LocalDefId) -> (Option<Span>, 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);