<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/core/src/panic, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-06-23T13:45:56+00:00</updated>
<entry>
<title>Use a NonNull pointer</title>
<updated>2025-06-23T13:45:56+00:00</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2025-06-23T13:45:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a1b7df4854b0023e34b18e2196d3069906da796'/>
<id>urn:sha1:6a1b7df4854b0023e34b18e2196d3069906da796</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not include NUL-terminator in computed length</title>
<updated>2025-06-19T07:47:49+00:00</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2025-06-12T10:56:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f3383e4942bca64ce523b7736a2bedd1b8426c11'/>
<id>urn:sha1:f3383e4942bca64ce523b7736a2bedd1b8426c11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix Debug for Location.</title>
<updated>2025-06-11T16:28:05+00:00</updated>
<author>
<name>Mara Bos</name>
<email>m-ou.se@m-ou.se</email>
</author>
<published>2025-06-11T16:28:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c85760c66ad94d0c1d50c5b8c537e26e896e6816'/>
<id>urn:sha1:c85760c66ad94d0c1d50c5b8c537e26e896e6816</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add Location::file_with_nul</title>
<updated>2025-06-04T16:23:05+00:00</updated>
<author>
<name>Taylor Cramer</name>
<email>cramertj@google.com</email>
</author>
<published>2025-01-03T01:47:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b541f93372c24bcbf036efc2b454cff6f6b8f8c5'/>
<id>urn:sha1:b541f93372c24bcbf036efc2b454cff6f6b8f8c5</id>
<content type='text'>
This is useful for C/C++ APIs which expect the const char* returned
from __FILE__ or std::source_location::file_name.
</content>
</entry>
<entry>
<title>Remove #[cfg(not(test))] gates in core</title>
<updated>2025-03-06T21:21:59+00:00</updated>
<author>
<name>Thalia Archibald</name>
<email>thalia@archibald.dev</email>
</author>
<published>2025-03-06T02:14:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=638b226a6ab5c5c784955068f57ae249e0ed0f92'/>
<id>urn:sha1:638b226a6ab5c5c784955068f57ae249e0ed0f92</id>
<content type='text'>
These gates are unnecessary now that unit tests for `core` are in a
separate package, `coretests`, instead of in the same files as the
source code. They previously prevented the two `core` versions from
conflicting with each other.
</content>
</entry>
<entry>
<title>replace placeholder version</title>
<updated>2024-11-27T12:10:21+00:00</updated>
<author>
<name>Boxy</name>
<email>rust@boxyuwu.dev</email>
</author>
<published>2024-11-25T11:46:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=174ad448c7c5d71232bf50661f91b319b7e2a7e6'/>
<id>urn:sha1:174ad448c7c5d71232bf50661f91b319b7e2a7e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stabilize const_arguments_as_str</title>
<updated>2024-11-03T06:49:24+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-11-02T11:01:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=234d3de8b441a9596e929e57d00d3c38560c5262'/>
<id>urn:sha1:234d3de8b441a9596e929e57d00d3c38560c5262</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>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>
</feed>
