about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-06 14:07:22 +0000
committerbors <bors@rust-lang.org>2018-08-06 14:07:22 +0000
commit4b8089daf8046d7999310d44e5c68ccff4ab255a (patch)
treed0af26b70ad7864085f4201d8399c4bcbfb682f1 /src/liballoc_system
parent78ec12df020453836c3b8990c0a8dd859b774e84 (diff)
parentb010d1f9295821f2f37de76a84ea4e26620456dd (diff)
downloadrust-4b8089daf8046d7999310d44e5c68ccff4ab255a.tar.gz
rust-4b8089daf8046d7999310d44e5c68ccff4ab255a.zip
Auto merge of #52990 - Aaron1011:fix/rustdoc-auto-trait-static, r=eddyb
Fix ICE when rustdoc encounters certain usages of HRTBs

Fixes #51236

Under certain circumstances, `AutoTraitFinder` could end up computing a `ParamEnv` involving two trait predicates that differed only in the region parameters involved. One of these parameters would be a HRTB, while the other would be a normal region parameter.

When this `ParamEnv` was later passed to `SelectionContext`, an `Ambiguity` error would occur, since the erased versions of these predicates would be identical. To solve the issue, we de-duplicate our list of predicates as we build it up. Whenever we encounter two predicates that differ only in their assignment of region parameters (a HRTB vs a normal lifetime parameter), we pick the HRTB. This corresponds to selecting a 'stricter' bound to display in the generated documentation: we're requiring that a particular type works for all possible lifetime parameters if it's going to implement a particular auto trait.
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions