diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-04-04 16:23:08 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-04-05 08:34:17 -0400 |
| commit | 3b7e654fad80e91064b26416a4334cd3e984a6ce (patch) | |
| tree | e4f17bd0488bfa0e6558a68ddc0d95faa34e2b6b /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | ac04dbd056a94d59699be3983e5404856a9add13 (diff) | |
| download | rust-3b7e654fad80e91064b26416a4334cd3e984a6ce.tar.gz rust-3b7e654fad80e91064b26416a4334cd3e984a6ce.zip | |
Use more appropriate return type for `resolve_associated_item`
Previously, the types looked like this: - None means this is not an associated item (but may be a variant field) - Some(Err) means this is known to be an error. I think the only way that can happen is if it resolved and but you had your own anchor. - Some(Ok(_, None)) was impossible. Now, this returns a nested Option and does the error handling and fiddling with the side channel in the caller. As a side-effect, it also removes duplicate error handling. This has one small change in behavior, which is that `resolve_primitive_associated_item` now goes through `variant_field` if it fails to resolve something. This is not ideal, but since it will be quickly rejected anyway, I think the performance hit is worth the cleanup. This also fixes a bug where struct fields would forget to set the side channel, adds a test for the bug, and ignores `private_intra_doc_links` in rustc_resolve (since it's always documented with --document-private-items).
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
