<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustdoc/html/render/mod.rs, branch 1.84.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.84.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.84.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-11-12T17:11:04+00:00</updated>
<entry>
<title>Rollup merge of #132541 - RalfJung:const-stable-extern-crate, r=compiler-errors</title>
<updated>2024-11-12T17:11:04+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-11-12T17:11:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4a699fc475128899f0957ca116021083af89b9d8'/>
<id>urn:sha1:4a699fc475128899f0957ca116021083af89b9d8</id>
<content type='text'>
Proper support for cross-crate recursive const stability checks

~~Stacked on top of https://github.com/rust-lang/rust/pull/132492; only the last three commits are new.~~

In a crate without `staged_api` but with `-Zforce-unstable-if-unmarked`, we now subject all functions marked with `#[rustc_const_stable_indirect]` to recursive const stability checks. We require an opt-in so that by default, a crate can be built with `-Zforce-unstable-if-unmarked` and use nightly features as usual. This property is recorded in the crate metadata so when a `staged_api` crate calls such a function, it sees the `#[rustc_const_stable_indirect]` and allows it to be exposed on stable. This, finally, will let us expose `const fn` from hashbrown on stable.

The second commit makes const stability more like regular stability: via `check_missing_const_stability`, we ensure that all publicly reachable functions have a const stability attribute -- both in  `staged_api` crates and `-Zforce-unstable-if-unmarked` crates. To achieve this, we move around the stability computation so that const stability is computed after regular stability is done. This lets us access the final result of the regular stability computation, which we use so that `const fn` can inherit the regular stability (but only if that is "unstable"). Fortunately, this lets us get rid of an `Option` in `ConstStability`.

This is the last PR that I have planned in this series.

r? `@compiler-errors`
</content>
</entry>
<entry>
<title>ensure that all publicly reachable const fn have const stability info</title>
<updated>2024-11-10T09:16:26+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-11-02T20:19:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e96808162ad7ff5906d7b58d32a25abe139e998c'/>
<id>urn:sha1:e96808162ad7ff5906d7b58d32a25abe139e998c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustdoc-search: add type param names to index</title>
<updated>2024-10-30T17:35:38+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-09-24T18:01:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=488d5b0d8e3dd25321615ae702689348574cc77f'/>
<id>urn:sha1:488d5b0d8e3dd25321615ae702689348574cc77f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Re-do recursive const stability checks</title>
<updated>2024-10-25T18:31:40+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-10-06T17:59:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a0215d8e46aab41219dea0bb1cbaaf97dafe2f89'/>
<id>urn:sha1:a0215d8e46aab41219dea0bb1cbaaf97dafe2f89</id>
<content type='text'>
Fundamentally, we have *three* disjoint categories of functions:
1. const-stable functions
2. private/unstable functions that are meant to be callable from const-stable functions
3. functions that can make use of unstable const features

This PR implements the following system:
- `#[rustc_const_stable]` puts functions in the first category. It may only be applied to `#[stable]` functions.
- `#[rustc_const_unstable]` by default puts functions in the third category. The new attribute `#[rustc_const_stable_indirect]` can be added to such a function to move it into the second category.
- `const fn` without a const stability marker are in the second category if they are still unstable. They automatically inherit the feature gate for regular calls, it can now also be used for const-calls.

Also, several holes in recursive const stability checking are being closed.
There's still one potential hole that is hard to avoid, which is when MIR
building automatically inserts calls to a particular function in stable
functions -- which happens in the panic machinery. Those need to *not* be
`rustc_const_unstable` (or manually get a `rustc_const_stable_indirect`) to be
sure they follow recursive const stability. But that's a fairly rare and special
case so IMO it's fine.

The net effect of this is that a `#[unstable]` or unmarked function can be
constified simply by marking it as `const fn`, and it will then be
const-callable from stable `const fn` and subject to recursive const stability
requirements. If it is publicly reachable (which implies it cannot be unmarked),
it will be const-unstable under the same feature gate. Only if the function ever
becomes `#[stable]` does it need a `#[rustc_const_unstable]` or
`#[rustc_const_stable]` marker to decide if this should also imply
const-stability.

Adding `#[rustc_const_unstable]` is only needed for (a) functions that need to
use unstable const lang features (including intrinsics), or (b) `#[stable]`
functions that are not yet intended to be const-stable. Adding
`#[rustc_const_stable]` is only needed for functions that are actually meant to
be directly callable from stable const code. `#[rustc_const_stable_indirect]` is
used to mark intrinsics as const-callable and for `#[rustc_const_unstable]`
functions that are actually called from other, exposed-on-stable `const fn`. No
other attributes are required.
</content>
</entry>
<entry>
<title>rustdoc: adjust spacing and typography in header</title>
<updated>2024-10-23T23:15:23+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-10-23T23:15:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a53655a023cee5dee1873bd3dfc805d7c460fbeb'/>
<id>urn:sha1:a53655a023cee5dee1873bd3dfc805d7c460fbeb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Handle `librustdoc` cases of `rustc::potential_query_instability` lint</title>
<updated>2024-10-06T07:39:03+00:00</updated>
<author>
<name>ismailarilik</name>
<email>arilik.ismail@gmail.com</email>
</author>
<published>2024-10-06T07:39:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e0a20b484d0b88183ddd46b82aa47d7bbfe48468'/>
<id>urn:sha1:e0a20b484d0b88183ddd46b82aa47d7bbfe48468</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reformat using the new identifier sorting from rustfmt</title>
<updated>2024-09-22T23:11:29+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-09-22T23:05:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c682aa162b0d41e21cc6748f4fecfe01efb69d1f'/>
<id>urn:sha1:c682aa162b0d41e21cc6748f4fecfe01efb69d1f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #130069 - GuillaumeGomez:gen-scraped-buttons, r=notriddle</title>
<updated>2024-09-19T15:53:31+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-09-19T15:53:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=749f80ab051aa0b3724b464130440b0e70a975ac'/>
<id>urn:sha1:749f80ab051aa0b3724b464130440b0e70a975ac</id>
<content type='text'>
Generate scraped examples buttons in JS

Follow-up of https://github.com/rust-lang/rust/pull/129796.

To reduce the page size when there are scraped examples, we can generate their buttons in JS since they require JS to work in any case. There should be no changes in display or in functionality.

You can test it [here](https://rustdoc.crud.net/imperio/gen-scraped-buttons/doc/scrape_examples/fn.test.html).

cc `@willcrichton`
r? `@notriddle`
</content>
</entry>
<entry>
<title>Auto merge of #129337 - EtomicBomb:rfc, r=notriddle</title>
<updated>2024-09-10T11:15:51+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2024-09-10T11:15:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f827364a95b93ab70afd0383fcf3caa9da40e1fb'/>
<id>urn:sha1:f827364a95b93ab70afd0383fcf3caa9da40e1fb</id>
<content type='text'>
rustdoc rfc#3662 changes under unstable flags

* All new functionality is under unstable options
* Adds `--merge=shared|none|finalize` flags
* Adds `--parts-out-dir=&lt;crate specific directory&gt;` for `--merge=none`
to write cross-crate info file for a single crate
* Adds `--include-parts-dir=&lt;previously specified directory&gt;` for
`--merge=finalize` to write cross-crate info files
* `tests/rustdoc/` tests for the new flags
</content>
</entry>
<entry>
<title>rustdoc: use a single box to store Attributes and ItemKind</title>
<updated>2024-09-08T04:06:50+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2024-08-30T17:52:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=65903362ad810c572e8ae742f6ed5ae3548238e4'/>
<id>urn:sha1:65903362ad810c572e8ae742f6ed5ae3548238e4</id>
<content type='text'>
</content>
</entry>
</feed>
