<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/consts/copy-intrinsic.stderr, branch auto</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=auto</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=auto'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-06-07T11:42:30+00:00</updated>
<entry>
<title>const-eval error: always say in which item the error occurred</title>
<updated>2025-06-07T11:42:30+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2025-06-07T09:32:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=17946c22b1d7abd2dd990bf6998c8491b534fe62'/>
<id>urn:sha1:17946c22b1d7abd2dd990bf6998c8491b534fe62</id>
<content type='text'>
also adjust the wording a little so that we don't say "the error occurred here" for two different spans
</content>
</entry>
<entry>
<title>Clarify why we are talking about a failed const eval at a random place</title>
<updated>2025-06-02T15:37:15+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-05-30T14:06:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=020216c31c1e4f1f56a689df8f04580504354613'/>
<id>urn:sha1:020216c31c1e4f1f56a689df8f04580504354613</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use the informative error as the main const eval error message</title>
<updated>2025-06-02T15:37:15+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>github333195615777966@oli-obk.de</email>
</author>
<published>2025-05-28T10:29:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b331b8b96d86a6433df957a3cc49ed51f3656135'/>
<id>urn:sha1:b331b8b96d86a6433df957a3cc49ed51f3656135</id>
<content type='text'>
</content>
</entry>
<entry>
<title>make std::intrinsic functions actually be intrinsics</title>
<updated>2025-05-20T06:09:16+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2025-04-16T12:50:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a29756d0853654cc4deb7c9ed899156f0ed19ca6'/>
<id>urn:sha1:a29756d0853654cc4deb7c9ed899156f0ed19ca6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>interpret: better error message for out-of-bounds pointer arithmetic and accesses</title>
<updated>2025-04-30T16:45:41+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2025-04-30T14:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=00f25a8e1cf7d749946a6a9fb7327bf4710c931f'/>
<id>urn:sha1:00f25a8e1cf7d749946a6a9fb7327bf4710c931f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove support for extern-block const intrinsics</title>
<updated>2024-11-04T22:27:45+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-11-01T21:19:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=10723c28964d582814ea8e07dbd8fa7367e0eaee'/>
<id>urn:sha1:10723c28964d582814ea8e07dbd8fa7367e0eaee</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>stabilize const_mut_refs</title>
<updated>2024-09-15T07:51:32+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-08-17T12:19:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3175cc2814dfa8a5201fdb165d67cc44300a77f4'/>
<id>urn:sha1:3175cc2814dfa8a5201fdb165d67cc44300a77f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>improve dangling/oob errors and make them more uniform</title>
<updated>2024-07-27T19:12:54+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-07-27T16:09:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f8ebe8d783e20c44508fab32b708f1b9d9a4bf13'/>
<id>urn:sha1:f8ebe8d783e20c44508fab32b708f1b9d9a4bf13</id>
<content type='text'>
</content>
</entry>
<entry>
<title>offset, offset_from: allow zero-byte offset on arbitrary pointers</title>
<updated>2024-05-13T05:59:16+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-05-09T10:35:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5c33a5690de89587b645fb0e7b657fe545e4d0e8'/>
<id>urn:sha1:5c33a5690de89587b645fb0e7b657fe545e4d0e8</id>
<content type='text'>
</content>
</entry>
</feed>
