about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-20 17:10:36 +0100
committerGitHub <noreply@github.com>2022-01-20 17:10:36 +0100
commit1839829f0a88a5835d3b85043d69b12d056ea191 (patch)
treef2b609b12cd9d1bca1cefe8b81e5810809c21df2 /compiler/rustc_codegen_llvm/src
parentdb1253f1d29dc71216c1a1f2473fd37f2a5275d0 (diff)
parent29a2d6b50536cee777ca5454b5f9bd1a58b5fc17 (diff)
downloadrust-1839829f0a88a5835d3b85043d69b12d056ea191.tar.gz
rust-1839829f0a88a5835d3b85043d69b12d056ea191.zip
Rollup merge of #92680 - camelid:assoc-item-cleanup, r=petrochenkov
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.

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