diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-10-15 16:07:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-15 16:07:52 -0700 |
| commit | 820fb7ccbf2fa6116ce09a178b2deb9e9b736704 (patch) | |
| tree | f75bad767136c3242eb147088206383c1d1a2f55 /src/test/ui/iterators/iter-sum-overflow-debug.rs | |
| parent | 42b35968fb9ef19c2177ee05aa06af81db698c78 (diff) | |
| parent | eefc1697c5d3ba52c2af46994ed158e4457171b8 (diff) | |
| download | rust-820fb7ccbf2fa6116ce09a178b2deb9e9b736704.tar.gz rust-820fb7ccbf2fa6116ce09a178b2deb9e9b736704.zip | |
Rollup merge of #65353 - Xanewok:sa-empty-tables, r=nikomatsakis
save-analysis: Don't ICE when resolving qualified type paths in struct members Previously, we failed since we use `qpath_res` via typeck tables - when using those we need to pass in a HirId that's local to the definition path the tables are rooted at (otherwise we risk frame of reference mismatch and an assertion against invalid lookup). In this case we can't get typeck tables for struct definition because it has no body, however the struct member type node is rooted under the struct definition and so we can't really do anything about it in terms of traversal. Instead, we try to "nest" the tables as always but change the default behaviour to use empty typeck tables rather than silently trying to use the current ones. This does work as we expect and for prior art, we use the same approach in the [privacy](https://github.com/rust-lang/rust/blob/7bc94cc3c2ccef8b4d393910bb978a6487db1202/src/librustc_privacy/lib.rs#L332-L341) [pass](https://github.com/rust-lang/rust/blob/7bc94cc3c2ccef8b4d393910bb978a6487db1202/src/librustc_privacy/lib.rs#L1007-L1028). Fixes #64659. Fixes #64821. r? @nikomatsakis (since this changes the default behaviour introduced in https://github.com/rust-lang/rust/commit/d7d3f197f62d7d0a1a612b7243f4617428cae53f)
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-debug.rs')
0 files changed, 0 insertions, 0 deletions
