<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/doc/rustdoc, branch 1.84.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.84.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.84.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-11-18T23:20:41+00:00</updated>
<entry>
<title>rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section.</title>
<updated>2024-11-18T23:20:41+00:00</updated>
<author>
<name>Alona Enraght-Moony</name>
<email>code@alona.page</email>
</author>
<published>2024-11-18T23:20:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ed465f209038f108e85f78bf3f8870aab127012e'/>
<id>urn:sha1:ed465f209038f108e85f78bf3f8870aab127012e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #127589 - notriddle:notriddle/search-sem-3, r=GuillaumeGomez</title>
<updated>2024-11-11T12:26:00+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-11-11T12:26:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d4822c2d84c242cc7403118b50c571464f38ef8f'/>
<id>urn:sha1:d4822c2d84c242cc7403118b50c571464f38ef8f</id>
<content type='text'>
rustdoc-search: simplify rules for generics and type params

**Heads up!**: This PR is a follow-up that depends on #124544. It adds 12dc24f46007f82b93ed85614347a42d47580afa, a change to the filtering behavior, and 9900ea48b566656fb12b5fcbd0a1b20aaa96e5ca, a minor ranking tweak.

Part of https://github.com/rust-lang/rust-project-goals/issues/112

This PR overturns https://github.com/rust-lang/rust/pull/109802

## Preview

* no results: [`Box&lt;[A]&gt; -&gt; Vec&lt;B&gt;`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CB%3E)
* results: [`Box&lt;[A]&gt; -&gt; Vec&lt;A&gt;`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CA%3E)
* [`T -&gt; U`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=T%20-%3E%20U)
* [`Cx -&gt; TyCtxt`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3-compiler/rustdoc/index.html?search=Cx%20-%3E%20TyCtxt)

![image](https://github.com/user-attachments/assets/015ae28c-7469-4f7f-be03-157d28d7ec97)

## Description

This commit is a response to feedback on the displayed type signatures results, by making generics act stricter.

- Order within generics is significant. This means `Vec&lt;Allocator&gt;` now matches only with a true vector of allocators, instead of matching the second type param. It also makes unboxing within generics stricter, so `Result&lt;A, B&gt;` only matches if `B` is in the error type and `A` is in the success type. The top level of the function search is unaffected.
- Generics are only "unboxed" if a type is explicitly opted into it. References and tuples are hardcoded to allow unboxing, and Box, Rc, Arc, Option, Result, and Future are opted in with an unstable attribute. Search result unboxing is the process that allows you to search for `i32 -&gt; str` and get back a function with the type signature `&amp;Future&lt;i32&gt; -&gt; Box&lt;str&gt;`.
- Instead of ranking by set overlap, it ranks by the number of items in the type signature. This makes it easier to find single type signatures like transmute.

## Find the discussion on

* &lt;https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149&gt;
* &lt;https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265&gt;
* &lt;https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search&gt;
</content>
</entry>
<entry>
<title>Rename target triple to target tuple in many places in the compiler</title>
<updated>2024-11-02T20:29:59+00:00</updated>
<author>
<name>Noratrieb</name>
<email>48135649+Noratrieb@users.noreply.github.com</email>
</author>
<published>2024-10-17T17:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a26450cf81d67d68d3c6157579f8d968349129e7'/>
<id>urn:sha1:a26450cf81d67d68d3c6157579f8d968349129e7</id>
<content type='text'>
This changes the naming to the new naming, used by `--print
target-tuple`.
It does not change all locations, but many.
</content>
</entry>
<entry>
<title>rustdoc-search: simplify rules for generics and type params</title>
<updated>2024-10-30T19:27:48+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-09-25T01:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=12dc24f46007f82b93ed85614347a42d47580afa'/>
<id>urn:sha1:12dc24f46007f82b93ed85614347a42d47580afa</id>
<content type='text'>
This commit is a response to feedback on the displayed type
signatures results, by making generics act stricter.

Generics are tightened by making order significant. This means
`Vec&lt;Allocator&gt;` now matches only with a true vector of allocators,
instead of matching the second type param. It also makes unboxing
within generics stricter, so `Result&lt;A, B&gt;` only matches if `B`
is in the error type and `A` is in the success type. The top level
of the function search is unaffected.

Find the discussion on:

* &lt;https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149&gt;
* &lt;https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265&gt;
* &lt;https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search/near/476841363&gt;
</content>
</entry>
<entry>
<title>Auto merge of #130587 - coolreader18:field-variant-doclink-disambig, r=notriddle,jyn514</title>
<updated>2024-10-01T01:45:35+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-10-01T01:45:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f79ef02e4bc87eb6dc8374cd4bde8e86f9695cf9'/>
<id>urn:sha1:f79ef02e4bc87eb6dc8374cd4bde8e86f9695cf9</id>
<content type='text'>
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:

&gt; jyn: maybe you can break this only if both [the method and the field] are public
&gt; jyn: rustc has some future-incompat warning level
&gt; jyn: that gets through -A warnings and --cap-lints from cargo

That'd be out of scope of this PR, though.

Fixes #80283
</content>
</entry>
<entry>
<title>Rename doctest attribute `standalone-crate` into `standalone_crate` for coherency</title>
<updated>2024-09-29T11:01:41+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2024-09-28T20:37:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6f5f21adfc88a914c507ba8c9a0f1f34ae292d44'/>
<id>urn:sha1:6f5f21adfc88a914c507ba8c9a0f1f34ae292d44</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `standalone` doctest attribute into `standalone-crate`</title>
<updated>2024-09-28T16:38:10+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2024-09-27T16:03:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cdf2a8ffc5f8af31529b44964457a7a7e9979680'/>
<id>urn:sha1:cdf2a8ffc5f8af31529b44964457a7a7e9979680</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add `field@` and `variant@` doc-link disambiguators</title>
<updated>2024-09-20T00:16:53+00:00</updated>
<author>
<name>Noa</name>
<email>coolreader18@gmail.com</email>
</author>
<published>2024-09-19T21:42:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e91e01509e1e034a71c545d42410d2ea4f7db89e'/>
<id>urn:sha1:e91e01509e1e034a71c545d42410d2ea4f7db89e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #128963 - GuillaumeGomez:output-to-stdout, r=aDotInTheVoid</title>
<updated>2024-08-14T22:02:26+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-08-14T22:02:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6c242a0da44215a9c0273802da5148aff32eec2c'/>
<id>urn:sha1:6c242a0da44215a9c0273802da5148aff32eec2c</id>
<content type='text'>
Add possibility to generate rustdoc JSON output to stdout

Fixes #127165.

I think it's likely common to want to get rustdoc json output directly instead of reading it from a file so I added this option to allow it. It's unstable and only works with `--output-format=json`.

r? `@aDotInTheVoid`
</content>
</entry>
<entry>
<title>Add documentation for the doctest `standalone` attribute</title>
<updated>2024-08-13T18:14:53+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2024-04-30T15:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=23badff4fef474232f7ad02c3380035435f1a1cf'/>
<id>urn:sha1:23badff4fef474232f7ad02c3380035435f1a1cf</id>
<content type='text'>
</content>
</entry>
</feed>
