<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/consts/qualif-indirect-mutation-fail.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>remove intrinsics::drop_in_place</title>
<updated>2025-04-22T12:06:09+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2025-04-22T07:37:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e7efab9ec95449d6565fec41d94c69abf5d3088a'/>
<id>urn:sha1:e7efab9ec95449d6565fec41d94c69abf5d3088a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Shorten span of panic failures in const context</title>
<updated>2025-02-28T16:28:41+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-02-03T18:43:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7d4d09eeeb7de6afae90b6cdbabed257eb77727f'/>
<id>urn:sha1:7d4d09eeeb7de6afae90b6cdbabed257eb77727f</id>
<content type='text'>
Previously, we included a redundant prefix on the panic message and a postfix of the location of the panic. The prefix didn't carry any additional information beyond "something failed", and the location of the panic is redundant with the diagnostic's span, which gets printed out even if its code is not shown.

```
error[E0080]: evaluation of constant value failed
  --&gt; $DIR/assert-type-intrinsics.rs:11:9
   |
LL |         MaybeUninit::&lt;!&gt;::uninit().assume_init();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation panicked: aborted execution: attempted to instantiate uninhabited type `!`
```

```
error[E0080]: evaluation of `Fail::&lt;i32&gt;::C` failed
  --&gt; $DIR/collect-in-dead-closure.rs:9:19
   |
LL |     const C: () = panic!();
   |                   ^^^^^^^^ evaluation panicked: explicit panic
   |
   = note: this error originates in the macro
`$crate::panic::panic_2015` which comes from the expansion of the macro
`panic` (in Nightly builds, run with -Z macro-backtrace for more info)
```

```
error[E0080]: evaluation of constant value failed
  --&gt; $DIR/uninhabited.rs:41:9
   |
LL |         assert!(false);
   |         ^^^^^^^^^^^^^^ evaluation panicked: assertion failed: false
   |
   = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
```

---

When the primary span for a const error is the same as the first frame in the const error report, skip it.

```
error[E0080]: evaluation of constant value failed
  --&gt; $DIR/issue-88434-removal-index-should-be-less.rs:3:24
   |
LL | const _CONST: &amp;[u8] = &amp;f(&amp;[], |_| {});
   |                        ^^^^^^^^^^^^^^ evaluation panicked: explicit panic
   |
note: inside `f::&lt;{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}&gt;`
  --&gt; $DIR/issue-88434-removal-index-should-be-less.rs:10:5
   |
LL |     panic!()
   |     ^^^^^^^^ the failure occurred here
   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
```
instead of
```
error[E0080]: evaluation of constant value failed
  --&gt; $DIR/issue-88434-removal-index-should-be-less.rs:10:5
   |
LL |     panic!()
   |     ^^^^^^^^ explicit panic
   |
note: inside `f::&lt;{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}&gt;`
  --&gt; $DIR/issue-88434-removal-index-should-be-less.rs:10:5
   |
LL |     panic!()
   |     ^^^^^^^^
note: inside `_CONST`
  --&gt; $DIR/issue-88434-removal-index-should-be-less.rs:3:24
   |
LL | const _CONST: &amp;[u8] = &amp;f(&amp;[], |_| {});
   |                        ^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
```

---

Revert order of constant evaluation errors

Point at the code the user wrote first and std functions last.

```
error[E0080]: evaluation of constant value failed
  --&gt; $DIR/const-errs-dont-conflict-103369.rs:5:25
   |
LL | impl ConstGenericTrait&lt;{my_fn(1)}&gt; for () {}
   |                         ^^^^^^^^ evaluation panicked: Some error occurred
   |
note: called from `my_fn`
  --&gt; $DIR/const-errs-dont-conflict-103369.rs:10:5
   |
LL |     panic!("Some error occurred");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
```
instead of
```
error[E0080]: evaluation of constant value failed
  --&gt; $DIR/const-errs-dont-conflict-103369.rs:10:5
   |
LL |     panic!("Some error occurred");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some error occurred
   |
note: called from `&lt;() as ConstGenericTrait&lt;{my_fn(1)}&gt;&gt;::{constant#0}`
  --&gt; $DIR/const-errs-dont-conflict-103369.rs:5:25
   |
LL | impl ConstGenericTrait&lt;{my_fn(1)}&gt; for () {}
   |                         ^^^^^^^^
   = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
```
</content>
</entry>
<entry>
<title>stabilize const_swap</title>
<updated>2024-12-25T09:36:32+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-12-25T09:36:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6de3a2e3a9c45e12f63a8e861131a39b1eb0e021'/>
<id>urn:sha1:6de3a2e3a9c45e12f63a8e861131a39b1eb0e021</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Gate const drop behind const_destruct feature, and fix const_precise_live_drops post-drop-elaboration check</title>
<updated>2024-11-22T16:54:40+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-11-19T17:08:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=20882608529a969bd878ad787cf0038716c021df'/>
<id>urn:sha1:20882608529a969bd878ad787cf0038716c021df</id>
<content type='text'>
</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>stabilize raw_ref_op</title>
<updated>2024-08-18T17:46:53+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-07-13T11:53:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=79503dd742253cdca54f10aec9052ff477ccaf38'/>
<id>urn:sha1:79503dd742253cdca54f10aec9052ff477ccaf38</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Always evaluate free constants and statics, even if previous errors occurred</title>
<updated>2024-02-19T22:11:13+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2024-02-14T12:28:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90626979170da2d6c5ec1622b3d7a9512df9eb71'/>
<id>urn:sha1:90626979170da2d6c5ec1622b3d7a9512df9eb71</id>
<content type='text'>
</content>
</entry>
</feed>
