summaryrefslogtreecommitdiff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-05-16 20:12:16 +0200
committerGitHub <noreply@github.com>2023-05-16 20:12:16 +0200
commit8d162fb150a177033cf71b03b53a6bc7ec6884f3 (patch)
tree8e82e2a7cfdc89b930f1ac91b23df3e61411d749 /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent9239760da89cd8e9a51536beeb0a23762064037d (diff)
parente7963a65ed4b913274fcd0a0dec0c71c2754a97c (diff)
downloadrust-8d162fb150a177033cf71b03b53a6bc7ec6884f3.tar.gz
Rollup merge of #107680 - dtolnay:docrepr, r=Amanieu
Hide repr attribute from doc of types without guaranteed repr Rustdoc has an undesirable behavior of blindly copying `repr` into the documentation of structs and enums, even when there is no particular repr that the type guarantees to its users. This is a source of confusion for standard library users who assume the fact that a repr is documented means it must be something the standard library promises they can rely on (in transmutes, or FFI). Some issues on the topic of rustdoc's incorrect handling of `repr`: - https://github.com/rust-lang/rust/issues/66401 - https://github.com/rust-lang/rust/issues/90435 In places, the standard library currently works around this confusing rustdoc behavior by just omitting `repr(transparent)` altogether even where it should be required if equivalent code were being written outside of the standard library. See #61969. IMO that is even more confusing, even for standard library maintainers &mdash; see https://github.com/rust-lang/rust/pull/105018#discussion_r1058400997. It's also not something that works for other reprs like `C` or `u8` which cannot just be omitted even in standard library code. This PR tries a different approach for some types that are being currently incorrectly documented with a repr. > **Warning** > This PR does not imply that every type that still has a `repr` attribute in its docs after this PR is now public for users to rely on. This PR only tries to reduce harm from this longstanding rustdoc issue.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions