<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustdoc/html/render/mod.rs, branch 1.63.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.63.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.63.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-06-20T18:12:55+00:00</updated>
<entry>
<title>Improve loading of crates.js and sidebar-items.js</title>
<updated>2022-06-20T18:12:55+00:00</updated>
<author>
<name>Jacob Hoffman-Andrews</name>
<email>github@hoffman-andrews.com</email>
</author>
<published>2022-06-15T06:25:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=27dcebeb3e88b97420a6d8f9279102892e27c775'/>
<id>urn:sha1:27dcebeb3e88b97420a6d8f9279102892e27c775</id>
<content type='text'>
Now that the "All Crates" dropdown is only rendered on the search results page,
there is no need to load crates.js on most pages. Load it only on crate pages.
Also, add the `defer` attribute so it does not block page rendering.

For sidebar-items.js, move the script tag to `&lt;head&gt;`. Since it already has the
defer attribute it won't block loading. The defer attribute does preserve
ordering between scripts, so instead of the callback on load, it can set a
global variable on load, which is slightly simpler. Also, since it is required
to finish rendering the page, beginning its load earlier is better.

Remove generation and handling of sidebar-vars. Everything there can be computed
with information available in JS via other means.

Remove the "other" wrapper in the sidebar. It was unnecessary.

Remove excess script fields
</content>
</entry>
<entry>
<title>Rollup merge of #90905 - GuillaumeGomez:empty-impl-blocks, r=jsha</title>
<updated>2022-06-06T06:36:59+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2022-06-06T06:36:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=77f0209fde995458d39dbd5f58699b8ddfd04452'/>
<id>urn:sha1:77f0209fde995458d39dbd5f58699b8ddfd04452</id>
<content type='text'>
Add empty impl blocks if they have documentation

Fixes https://github.com/rust-lang/rust/issues/90866.

The update for the test script is needed to count the number of impl blocks we have with only the struct. To be noted that with https://github.com/rust-lang/rust/pull/89676 merged, it wouldn't be needed (I don't know what is the status of it btw. cc ```@Mark-Simulacrum).```

It looks like this:

![Screenshot from 2021-11-14 16-51-28](https://user-images.githubusercontent.com/3050060/141689100-e57123c0-bf50-4c42-adf5-d991e169a0e4.png)

cc ```@jyn514```
r? ```@camelid```
</content>
</entry>
<entry>
<title>Don't generate "Impls on Foreign Types" for std</title>
<updated>2022-06-04T18:10:51+00:00</updated>
<author>
<name>Jacob Hoffman-Andrews</name>
<email>github@hoffman-andrews.com</email>
</author>
<published>2022-06-04T18:03:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=784eebcc604a10c697f6dce2f82155268333c57c'/>
<id>urn:sha1:784eebcc604a10c697f6dce2f82155268333c57c</id>
<content type='text'>
Hack: many traits and types in std are re-exported from core or alloc. In
general, rustdoc is capable of recognizing these implementations as being
on local types. However, in at least one case, rustdoc gets confused and
labels an implementation as being on a foreign type. To make sure that
confusion doesn't pass on to the reader, consider all implementations in
std, core, and alloc to be on local types.
</content>
</entry>
<entry>
<title>Rollup merge of #97613 - jsha:implementation-is-on-local-type, r=GuillaumeGomez</title>
<updated>2022-06-01T21:44:29+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>jtitor@2k36.org</email>
</author>
<published>2022-06-01T21:44:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a96e71c7520c77147b8bf6ae33fd35bec8d69f68'/>
<id>urn:sha1:a96e71c7520c77147b8bf6ae33fd35bec8d69f68</id>
<content type='text'>
rustdoc: Improve calculation of "Impls on Foreign Types"

The existing code to calculate whether an implementation was on a "Foreign Type" was duplicated across the sidebar generation and the page generation. It also came to the wrong conclusion for some cases where both the trait and the "for" type were re-exports.

This PR extracts the logic into a method of `Impl`, breaks it into a multi-line method so it can be commented, and adds a case for when the trait and the "for" type came from the same crate. This fixes some cases - like the platform-specific integer types (`__m256`, `__m128`, etc). But it doesn't fix all cases. See the screenshots below.

[Before](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html#foreign-impls):

&lt;img src="https://user-images.githubusercontent.com/220205/171338226-59ce6daf-3d76-4bad-bc8d-72a8259a8f43.png" width=200&gt;

[After](https://rustdoc.crud.net/jsha/implementation-is-on-local-type/std/clone/trait.Clone.html):

&lt;img src="https://user-images.githubusercontent.com/220205/171338147-28308a65-1597-4223-be47-9550062404dd.png" width=200&gt;

The remaining types (`CString`, `NulError`, etc) are all from the `alloc` crate, while the `Clone` trait is from the `core` crate. Since `CString` and `Clone` are both re-exported by `std`, they are logically local to each other, but I couldn't figure out a good way to detect that in this code. I figure this is still a good step forward.

Related: #97610

r? `@camelid`
</content>
</entry>
<entry>
<title>Improve calculation of "Impls on Foreign Types"</title>
<updated>2022-06-01T16:11:50+00:00</updated>
<author>
<name>Jacob Hoffman-Andrews</name>
<email>github@hoffman-andrews.com</email>
</author>
<published>2022-05-31T05:53:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=37d363879e9dbc60969b297a99220e7928cb28a9'/>
<id>urn:sha1:37d363879e9dbc60969b297a99220e7928cb28a9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Display empty impl blocks if they have documentations</title>
<updated>2022-05-31T12:02:34+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2021-11-14T16:11:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5881fd5c953a1af80f870b59de9726ae9ae62b37'/>
<id>urn:sha1:5881fd5c953a1af80f870b59de9726ae9ae62b37</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix order of closing HTML elements in rustdoc output</title>
<updated>2022-05-29T13:22:25+00:00</updated>
<author>
<name>Jan-Erik Rediger</name>
<email>janerik@fnordig.de</email>
</author>
<published>2022-05-29T13:22:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9f68b998db87e030c5a9a96fdb99f3dcd8911932'/>
<id>urn:sha1:9f68b998db87e030c5a9a96fdb99f3dcd8911932</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Pass Context as a &amp;mut to allow to remove RefCell fields</title>
<updated>2022-05-27T20:16:24+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2022-05-26T18:18:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6ab8edb931c6d8959db162570a370a19aac9552d'/>
<id>urn:sha1:6ab8edb931c6d8959db162570a370a19aac9552d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix clippy perf lints</title>
<updated>2022-05-24T17:35:54+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2022-05-24T17:35:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a326bcc748edf03a2f64a7a154eab593688c0f6'/>
<id>urn:sha1:2a326bcc748edf03a2f64a7a154eab593688c0f6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix simple clippy lints</title>
<updated>2022-05-24T16:24:41+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2022-05-21T18:07:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=678059f7d03f05b5a9b81b509d251ac83e87f464'/>
<id>urn:sha1:678059f7d03f05b5a9b81b509d251ac83e87f464</id>
<content type='text'>
</content>
</entry>
</feed>
