about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2022-01-08 14:48:25 -0800
committerNoah Lev <camelidcamel@gmail.com>2022-01-18 16:05:12 -0800
commit29a2d6b50536cee777ca5454b5f9bd1a58b5fc17 (patch)
treec8c5861fe5c34f9fc0f498cb92178868758b3a68 /compiler/rustc_codegen_llvm/src
parent9ad5d82f822b3cb67637f11be2e65c5662b66ec0 (diff)
downloadrust-29a2d6b50536cee777ca5454b5f9bd1a58b5fc17.tar.gz
rust-29a2d6b50536cee777ca5454b5f9bd1a58b5fc17.zip
intra-doc: Use the impl's assoc item where possible
Before, the trait's associated item would be used. Now, the impl's
associated item is used. The only exception is for impls that use
default values for associated items set by the trait. In that case,
the trait's associated item is still used.

As an example of the old and new behavior, take this code:

    trait MyTrait {
        type AssocTy;
    }

    impl MyTrait for String {
        type AssocTy = u8;
    }

Before, when resolving a link to `String::AssocTy`,
`resolve_associated_trait_item` would return the associated item for
`MyTrait::AssocTy`. Now, it would return the associated item for
`<String as MyTrait>::AssocTy`, as it claims in its docs.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions