diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2019-03-11 15:14:24 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2019-03-11 15:14:24 +0100 |
| commit | c99303351dd67df8657d9f11ca00d65dcceb8438 (patch) | |
| tree | b0af8a2c94edc6a17097b357e2de1dab44531797 /src/test/incremental/thinlto | |
| parent | d6cee67c27cae727e24f266f76d6613e2781f7b6 (diff) | |
| download | rust-c99303351dd67df8657d9f11ca00d65dcceb8438.tar.gz rust-c99303351dd67df8657d9f11ca00d65dcceb8438.zip | |
Revised warning-downgrade strategy for nested impl trait.
Instead of a sticky-boolean flag that would downgrade errors to warnings during further recursion into the type (which is overly broad because we were not missing errors at arbitrarily deep levels), this instead tracks state closer to what the original bug actually was. In particular, the actual original bug was that we were failing to record the existence of an outer `impl Trait` solely when it occurred as an *immediate child* during the walk of the child types in `visit_generic_args`. Therefore, the correct way to precisely model when that bug would manifest itself (and thus downgrade the error-to-warning accordingly) is to track when those outer `impl Trait` cases were previously unrecorded. That's what this code does, by storing a flag with the recorded outer `impl Trait` indicating at which point in the compiler's control flow it had been stored. I will note that this commit passes the current test suite. A follow-up commit will also include tests illustrating the cases that this commit gets right (and were handled incorrectly by the previous sticky boolean).
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
