about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2020-08-19 11:12:22 -0700
committerGitHub <noreply@github.com>2020-08-19 11:12:22 -0700
commit7d1407721c2cd9e700e2f27d12cfaa98e0e30720 (patch)
treec86c09ad6b636a372975e7beffb1cdd4bf2c2268 /compiler/rustc_codegen_llvm/src
parent4123237fa16776b9806c2f7da721e8adc50ce43d (diff)
parentaff01f8de915d201b588a0dcff502f7adde7194d (diff)
downloadrust-7d1407721c2cd9e700e2f27d12cfaa98e0e30720.tar.gz
rust-7d1407721c2cd9e700e2f27d12cfaa98e0e30720.zip
Rollup merge of #75649 - jyn514:inherent-lang-impls, r=guillaumegomez
Fix intra-doc links for inherent impls that are both lang items and not the default impl

I found in https://github.com/rust-lang/rust/pull/75464#issuecomment-675125984 that `str::to_uppercase()` doesn't resolve while `str::trim()` does. The only real difference is that `to_uppercase` is defined in `alloc`, while trim is defined in `core`. It turns out that rustdoc was ignoring `lang_items.str_alloc_impl()` - it saw them in `collect_trait_impls`, but not for intra-doc links.

This uses the same `impls` for all parts of rustdoc, so that there can be no more inconsistency. It does have the slight downside that the matches are no longer exhaustive but it will be very clear if a new lang item is missed because it will panic when you try to document it (and if you don't document it, does rustdoc really need to know about it?).

~~This needs a test case (probably just `str::to_uppercase`).~~ Added.

This is best reviewed commit-by-commit.

r? @GuillaumeGomez
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions