diff options
| author | bors <bors@rust-lang.org> | 2024-10-01 01:45:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-01 01:45:35 +0000 |
| commit | f79ef02e4bc87eb6dc8374cd4bde8e86f9695cf9 (patch) | |
| tree | 0767296b123911726dedd2b39929ec16a112a5e7 /library/std/src | |
| parent | c87004a1f5be671e3f03f69fb13d8915bdbb6a52 (diff) | |
| parent | e91e01509e1e034a71c545d42410d2ea4f7db89e (diff) | |
| download | rust-f79ef02e4bc87eb6dc8374cd4bde8e86f9695cf9.tar.gz rust-f79ef02e4bc87eb6dc8374cd4bde8e86f9695cf9.zip | |
Auto merge of #130587 - coolreader18:field-variant-doclink-disambig, r=notriddle,jyn514
Add `field@` and `variant@` doc-link disambiguators I'm not sure if this is big enough to need an fcp or not, but this is something I found missing when trying to refer to a field in macro-generated docs, not knowing if a method might be defined as well. Obviously, there are definitely other uses. In the case where it's not disambiguated, methods (and I suppose other associated items in the value namespace) still take priority, which `@jyn514` said was an oversight but I think is probably the desired behavior 99% of the time anyway - shadowing a field with an accessor method is a very common pattern. If fields and methods with the same name started conflicting, it would be a breaking change. Though, to quote them: > jyn: maybe you can break this only if both [the method and the field] are public > jyn: rustc has some future-incompat warning level > jyn: that gets through -A warnings and --cap-lints from cargo That'd be out of scope of this PR, though. Fixes #80283
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions
