about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2024-07-31 16:45:05 -0700
committerNoah Lev <camelidcamel@gmail.com>2024-08-04 12:49:27 -0700
commit664b3ffbe932d93677ac7dff52252e02aee60ef9 (patch)
treedd070d567793922f464194558382385c16e95eaa /tests/codegen/patchable-function-entry
parent249d686c7005ebb4d05234e9db6d29c2923296e2 (diff)
downloadrust-664b3ffbe932d93677ac7dff52252e02aee60ef9.tar.gz
rust-664b3ffbe932d93677ac7dff52252e02aee60ef9.zip
rustdoc: Create `SelfTy` to replace `Generic(kw::SelfUpper)`
Rustdoc often has to special-case `Self` because it is, well, a special
type of generic parameter (although it also behaves as an alias in
concrete impls). Instead of spreading this special-casing throughout the
code base, create a new variant of the `clean::Type` enum that is for
`Self` types.

This is a refactoring that has almost no impact on rustdoc's behavior,
except that `&Self`, `(Self,)`, `&[Self]`, and other similar occurrences
of `Self` no longer link to the wrapping type (reference primitive,
tuple primitive, etc.) as regular generics do. I felt this made more
sense since users would expect `Self` to link to the containing trait or
aliased type (though those are usually expanded), not the primitive that
is wrapping it. For an example of the change, see the docs for
`std::alloc::Allocator::by_ref`.
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions