about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-01-29 09:17:32 +0900
committerGitHub <noreply@github.com>2021-01-29 09:17:32 +0900
commitc18d6f1ffa683a998e9c8a3ff93f6560b2103008 (patch)
tree47ac6c8534e0ec3bd7ab102ee880323b46061664 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent299ff49667c213a87c22e371298a87a5b4f874a6 (diff)
parent2454408318814a2451b0698fa6d1cbffcaafda5f (diff)
downloadrust-c18d6f1ffa683a998e9c8a3ff93f6560b2103008.tar.gz
rust-c18d6f1ffa683a998e9c8a3ff93f6560b2103008.zip
Rollup merge of #81176 - camsteffen:qpath-res, r=oli-obk
Improve safety of `LateContext::qpath_res`

This is my first rustc code change, inspired by hacking on clippy!

The first change is to clear cached `TypeckResults` from `LateContext` when visiting a nested item. I took a hint from [here](https://github.com/rust-lang/rust/blob/5e91c4ecc09312d8b63d250a432b0f3ef83f1df7/compiler/rustc_privacy/src/lib.rs#L1300).

Clippy has a `qpath_res` util function to avoid a possible ICE in `LateContext::qpath_res`. But the docs of `LateContext::qpath_res` promise no ICE. So this updates the `LateContext` method to keep its promises, and removes the util function.

Related: rust-lang/rust-clippy#4545

CC ````````````@eddyb```````````` since you've done related work
CC ````````````@flip1995```````````` FYI
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions