Skip to content

Commit 4a0c2b2

Browse files
committed
Add a FIXME explaining how one could go about fixing this code to bring it in
sync with the method added in PR 94584.
1 parent 673640d commit 4a0c2b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_typeck/src/check/method/suggest.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,10 @@ pub fn all_traits(tcx: TyCtxt<'_>) -> Vec<TraitInfo> {
19361936
}
19371937

19381938
fn find_use_placement<'tcx>(tcx: TyCtxt<'tcx>, target_module: LocalDefId) -> (Option<Span>, bool) {
1939+
// FIXME(#94854): this code uses an out-of-date method for inferring a span
1940+
// to suggest. It would be better to thread the ModSpans from the AST into
1941+
// the HIR, and then use that to drive the suggestion here.
1942+
19391943
let mut span = None;
19401944
let mut found_use = false;
19411945
let (module, _, _) = tcx.hir().get_module(target_module);

0 commit comments

Comments
 (0)