diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-26 18:24:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-26 18:24:59 +0800 |
| commit | 46f504543d47e18484a65251918a937147bb8a45 (patch) | |
| tree | 98a73c2cd1ecea9180a658ec02b08993c3889e41 /src/rustllvm/RustWrapper.cpp | |
| parent | d83376c70511b2fc12506bb22c3bb02353e028d1 (diff) | |
| parent | 4f2624cac90ee9145175d6e4b9c59b9ab7875a9c (diff) | |
| download | rust-46f504543d47e18484a65251918a937147bb8a45.tar.gz rust-46f504543d47e18484a65251918a937147bb8a45.zip | |
Rollup merge of #55258 - Aaron1011:fix/rustdoc-blanket, r=GuillaumeGomez
Fix Rustdoc ICE when checking blanket impls Fixes #55001, #54744 Previously, SelectionContext would unconditionally cache the selection result for an obligation. This worked fine for most users of SelectionContext, but it caused an issue when used by Rustdoc's blanket impl finder. The issue occured when SelectionContext chose a ParamCandidate which contained inference variables. Since inference variables can change between calls to select(), it's not safe to cache the selection result - the chosen candidate might not be applicable for future results, leading to an ICE when we try to run confirmation. This commit prevents SelectionContext from caching any ParamCandidate that contains inference variables. This should always be completely safe, as trait selection should never depend on a particular result being cached. I've also added some extra debug!() statements, which I found helpful in tracking down this bug.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
