mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 03:07:24 +03:00
883eda3a72
Fix invalid type suggestion for item nested in function Fixes rust-lang/rust#146786 I also tried to add the `omit_parent` logic in pretty formatter here: https://github.com/chenyukang/rust/blob/69b6d26d05006dca7556abc555fb0e029ecf1f4e/compiler/rustc_middle/src/ty/print/pretty.rs#L2240-L2295 so that we don't need to add `should_omit_parent_def_path` and `reset_path`. but seems there will be duplicate print code with `default_print_def_path`. maybe r? @estebank
For high-level intro to how type checking works in rustc, see the hir typeck chapter of the rustc dev guide.