diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-01-29 09:17:32 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-29 09:17:32 +0900 |
| commit | 0c5fccea22f5ead38b4c9521c77af93ddcb55bff (patch) | |
| tree | 381a1c65c952840c75636935ce176b8eea3497db /compiler/rustc_interface/src | |
| parent | 4283623bc0ccc8a7b71e54bb068bfb3b7d80d80d (diff) | |
| parent | eaba3daa60d789997c0be3da11619df2469e9a7e (diff) | |
| download | rust-0c5fccea22f5ead38b4c9521c77af93ddcb55bff.tar.gz rust-0c5fccea22f5ead38b4c9521c77af93ddcb55bff.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_interface/src')
0 files changed, 0 insertions, 0 deletions
