rust/tests/ui/consts/const-eval
bors 9b72238eb8 Auto merge of #128543 - RalfJung:const-interior-mut, r=fee1-dead
const-eval interning: accept interior mutable pointers in final value

…but keep rejecting mutable references

This fixes https://github.com/rust-lang/rust/issues/121610 by no longer firing the lint when there is a pointer with interior mutability in the final value of the constant. On stable, such pointers can be created with code like:
```rust
pub enum JsValue {
    Undefined,
    Object(Cell<bool>),
}
impl Drop for JsValue {
    fn drop(&mut self) {}
}
// This does *not* get promoted since `JsValue` has a destructor.
// However, the outer scope rule applies, still giving this 'static lifetime.
const UNDEFINED: &JsValue = &JsValue::Undefined;
```
It's not great to accept such values since people *might* think that it is legal to mutate them with unsafe code. (This is related to how "infectious" `UnsafeCell` is, which is a [wide open question](https://github.com/rust-lang/unsafe-code-guidelines/issues/236).) However, we [explicitly document](https://doc.rust-lang.org/reference/behavior-considered-undefined.html) that things created by `const` are immutable. Furthermore, we also accept the following even more questionable code without any lint today:
```rust
let x: &'static Option<Cell<i32>> = &None;
```
This is even more questionable since it does *not* involve a `const`, and yet still puts the data into immutable memory. We could view this as promotion [potentially introducing UB](https://github.com/rust-lang/unsafe-code-guidelines/issues/493). However, we've accepted this since ~forever and it's [too late to reject this now](https://github.com/rust-lang/rust/pull/122789); the pattern is just too useful.

So basically, if you think that `UnsafeCell` should be tracked fully precisely, then you should want the lint we currently emit to be removed, which this PR does. If you think `UnsafeCell` should "infect" surrounding `enum`s, the big problem is really https://github.com/rust-lang/unsafe-code-guidelines/issues/493 which does not trigger the lint -- the cases the lint triggers on are actually the "harmless" ones as there is an explicit surrounding `const` explaining why things end up being immutable.

What all this goes to show is that the hard error added in https://github.com/rust-lang/rust/pull/118324 (later turned into the future-compat lint that I am now suggesting we remove) was based on some wrong assumptions, at least insofar as it concerns shared references. Furthermore, that lint does not help at all for the most problematic case here where the potential UB is completely implicit. (In fact, the lint is actively in the way of [my preferred long-term strategy](https://github.com/rust-lang/unsafe-code-guidelines/issues/493#issuecomment-2028674105) for dealing with this UB.) So I think we should go back to square one and remove that error/lint for shared references. For mutable references, it does seem to work as intended, so we can keep it. Here it serves as a safety net in case the static checks that try to contain mutable references to the inside of a const initializer are not working as intended; I therefore made the check ICE to encourage users to tell us if that safety net is triggered.

Closes https://github.com/rust-lang/rust/issues/122153 by removing the lint.

Cc `@rust-lang/opsem` `@rust-lang/lang`
2024-09-14 21:11:04 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
heap turn errors that should be impossible due to our static checks into ICEs 2024-09-10 10:27:30 +02:00
simd Ban non-array SIMD 2024-09-09 19:39:43 -07:00
stable-metric [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
assign-to-static-within-other-static.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
assign-to-static-within-other-static.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
conditional_array_execution.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
conditional_array_execution.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const_fn_ptr_fail2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_fn_ptr_fail2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_fn_ptr_fail.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_fn_ptr_fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_fn_ptr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_fn_ptr.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
const_fn_target_feature_wasm.rs interpret: do not make const-eval query result depend on tcx.sess 2024-08-26 17:08:52 +02:00
const_fn_target_feature.rs interpret: do not make const-eval query result depend on tcx.sess 2024-08-26 17:08:52 +02:00
const_let.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_let.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic_2021.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_panic_2021.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic_libcore_bin.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic_libcore_bin.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic_stability.e2018.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic_stability.e2021.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const_panic_stability.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_panic_track_caller.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic_track_caller.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const_panic-normalize-tabs-115498.rs Don't forget to normalize the translated message 2023-09-03 17:10:42 +02:00
const_panic-normalize-tabs-115498.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const_panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_panic.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_prop_errors.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const_raw_ptr_ops2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const_raw_ptr_ops2.stderr improve dangling/oob errors and make them more uniform 2024-07-27 21:12:54 +02:00
const_raw_ptr_ops.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
const_raw_ptr_ops.stderr fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
const_signed_pat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
const-eval-intrinsic-promotion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-intrinsic-promotion.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const-eval-overflow2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow2b.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow2b.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow2c.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow2c.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow-2.rs Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
const-eval-overflow-2.stderr Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
const-eval-overflow-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const-eval-overflow-3b.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow-3b.stderr Spell out other trait diagnostic 2024-06-12 12:34:47 +00:00
const-eval-overflow-4.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow-4.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const-eval-overflow-4b.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
const-eval-overflow-4b.stderr Spell out other trait diagnostic 2024-06-12 12:34:47 +00:00
const-eval-query-stack.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
const-eval-query-stack.stderr tests: bless ui and rustdoc-ui tests for ICE messages 2024-04-09 13:58:52 +00:00
const-eval-span.rs Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
const-eval-span.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
const-pointer-values-in-various-types.64bit.stderr const validation: point at where we found a pointer but expected an integer 2023-08-02 18:51:50 +02:00
const-pointer-values-in-various-types.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont_promote_unstable_const_fn_cross_crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dont_promote_unstable_const_fn_cross_crate.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dont_promote_unstable_const_fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dont_promote_unstable_const_fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
double_check2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
double_check.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
duration_conversion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
enum_discr.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
extern_fat_pointer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
field-access-after-const-eval-fail-in-ty.rs Check for presence of field in typeck results before visiting it 2024-02-03 19:41:18 +01:00
field-access-after-const-eval-fail-in-ty.stderr Check for presence of field in typeck results before visiting it 2024-02-03 19:41:18 +01:00
format.rs Move the checks for Arguments constructors to inline const 2024-05-24 21:09:15 -04:00
format.stderr Move the checks for Arguments constructors to inline const 2024-05-24 21:09:15 -04:00
generic-slice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
generic-slice.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
ice-generic-assoc-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ice-packed.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ice-unhandled-type-122191.rs Add missing tests for an ICE 2024-04-27 11:02:15 +05:30
ice-unhandled-type-122191.stderr Add missing tests for an ICE 2024-04-27 11:02:15 +05:30
ice-unsized-struct-const-eval-123154.rs Fail candidate assembly for erroneous types 2024-04-16 12:42:48 +05:30
ice-unsized-struct-const-eval-123154.stderr Fail candidate assembly for erroneous types 2024-04-16 12:42:48 +05:30
index_out_of_bounds_propagated.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
index_out_of_bounds_propagated.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
index_out_of_bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
index_out_of_bounds.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
index-out-of-bounds-never-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
index-out-of-bounds-never-type.stderr preserve span when evaluating mir::ConstOperand 2024-03-14 21:55:07 +01:00
infinite_loop.eval_limit.stderr Fix crash in late internal checking 2024-03-08 19:00:53 +08:00
infinite_loop.no_ice.stderr Fix crash in late internal checking 2024-03-08 19:00:53 +08:00
infinite_loop.rs Fix crash in late internal checking 2024-03-08 19:00:53 +08:00
issue-43197.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-43197.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-44578.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-44578.stderr Enable ConstPropLint for promoteds 2024-02-17 10:44:46 +05:30
issue-47971.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-49296.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49296.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-50706.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-50814-2.mir-opt.stderr preserve span when evaluating mir::ConstOperand 2024-03-14 21:55:07 +01:00
issue-50814-2.normal.stderr preserve span when evaluating mir::ConstOperand 2024-03-14 21:55:07 +01:00
issue-50814-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-50814.rs Enable ConstPropLint for promoteds 2024-02-17 10:44:46 +05:30
issue-50814.stderr preserve span when evaluating mir::ConstOperand 2024-03-14 21:55:07 +01:00
issue-51300.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-52475.rs Remove const eval limit and implement an exponential backoff lint instead 2023-05-31 10:24:17 +00:00
issue-52475.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-53157.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-53401.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55541.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64908.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-64970.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-65394.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-65394.stderr Bless tests 2024-01-13 12:46:58 -05:00
issue-70723.rs Remove const eval limit and implement an exponential backoff lint instead 2023-05-31 10:24:17 +00:00
issue-70723.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-70804-fn-subtyping.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84957-const-str-as-bytes.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-85155.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-85155.stderr preserve span when evaluating mir::ConstOperand 2024-03-14 21:55:07 +01:00
issue-85907.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85907.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-91827-extern-types-field-offset.rs also test projecting to some sized fields at non-zero offset in structs with an extern type tail 2023-12-12 17:19:19 +01:00
issue-91827-extern-types-field-offset.stderr don't ICE when encountering an extern type field during validation 2024-06-22 17:39:01 +02:00
issue-100878.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-104390.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-104390.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
issue-114994-fail.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-114994-fail.stderr Bless tests 2024-01-13 12:46:58 -05:00
issue-114994.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
livedrop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
livedrop.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
match-test-ptr-null.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-test-ptr-null.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
mod-static-with-const-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mod-static-with-const-fn.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
no_lint_for_statically_known_error.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nonnull_as_ref_ub.rs don't UB on dangling ptr deref, instead check inbounds on projections 2023-10-15 18:12:46 +02:00
nonnull_as_ref_ub.stderr improve dangling/oob errors and make them more uniform 2024-07-27 21:12:54 +02:00
nonnull_as_ref.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nrvo.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
panic-assoc-never-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
panic-assoc-never-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
panic-never-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
panic-never-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
parse_ints.rs stabilize const_int_from_str 2024-07-04 21:27:51 +02:00
parse_ints.stderr stabilize const_int_from_str 2024-07-04 21:27:51 +02:00
partial_ptr_overwrite.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
partial_ptr_overwrite.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
promote_mutable_zst_mir_borrowck.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
promote-static.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
promoted_const_fn_fail_deny_const_err.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
promoted_const_fn_fail_deny_const_err.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
promoted_const_fn_fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
promoted_const_fn_fail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
promoted_raw_ptr_ops.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
promoted_raw_ptr_ops.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
raw-bytes.32bit.stderr interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
raw-bytes.64bit.stderr interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
raw-bytes.rs interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
raw-pointer-ub.rs improve dangling/oob errors and make them more uniform 2024-07-27 21:12:54 +02:00
raw-pointer-ub.stderr on a signed deref check, mention the right pointer in the error 2024-08-01 14:25:19 +02:00
ref_to_int_match.32bit.stderr const validation: point at where we found a pointer but expected an integer 2023-08-02 18:51:50 +02:00
ref_to_int_match.64bit.stderr const validation: point at where we found a pointer but expected an integer 2023-08-02 18:51:50 +02:00
ref_to_int_match.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
shift_overflow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shift_overflow.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
simple_with_undef.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
size-of-t.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
size-of-t.stderr generic_const_exprs: suggest to add the feature, not use it 2023-11-30 20:59:51 +01:00
strlen.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transmute-const-promotion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-const-promotion.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
transmute-const.32bit.stderr Manual find replace updates 2023-11-24 21:04:51 +01:00
transmute-const.64bit.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
transmute-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transmute-size-mismatch.rs Add CastKind::Transmute to MIR 2023-03-22 15:15:41 -07:00
transmute-size-mismatch.stderr Add CastKind::Transmute to MIR 2023-03-22 15:15:41 -07:00
ub-enum-overwrite.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ub-enum-overwrite.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
ub-enum.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
ub-enum.stderr remove an unnecessary stderr-per-bitwidth 2024-01-06 14:54:08 +01:00
ub-incorrect-vtable.32bit.stderr interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
ub-incorrect-vtable.64bit.stderr interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
ub-incorrect-vtable.rs interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
ub-int-array.rs Fix ub-int-array test for big-endian platforms 2023-08-24 12:49:53 +02:00
ub-int-array.stderr Fix ub-int-array test for big-endian platforms 2023-08-24 12:49:53 +02:00
ub-invalid-values.rs add const eval bool-to-int cast test 2024-06-11 13:28:36 +02:00
ub-invalid-values.stderr add const eval bool-to-int cast test 2024-06-11 13:28:36 +02:00
ub-nonnull.chalk.64bit.stderr Manual find replace updates 2023-11-24 21:04:51 +01:00
ub-nonnull.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
ub-nonnull.stderr on a signed deref check, mention the right pointer in the error 2024-08-01 14:25:19 +02:00
ub-ref-ptr.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
ub-ref-ptr.stderr also print 'immutable' flag 2023-12-07 17:46:36 +01:00
ub-slice-get-unchecked.rs remove const_slice_index annotations, it never had a feature gate anyway 2024-09-08 23:08:43 +02:00
ub-slice-get-unchecked.stderr remove const_slice_index annotations, it never had a feature gate anyway 2024-09-08 23:08:43 +02:00
ub-uninhabit.rs Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
ub-uninhabit.stderr read_via_copy: don't prematurely optimize away the read 2023-09-04 18:27:34 +02:00
ub-upvars.32bit.stderr also print 'immutable' flag 2023-12-07 17:46:36 +01:00
ub-upvars.64bit.stderr also print 'immutable' flag 2023-12-07 17:46:36 +01:00
ub-upvars.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ub-wide-ptr.chalk.64bit.stderr Manual find replace updates 2023-11-24 21:04:51 +01:00
ub-wide-ptr.rs interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
ub-wide-ptr.stderr interpret: make identity upcasts a NOP again to avoid them generating a new random vtable 2024-08-09 18:48:45 +02:00
ub-write-through-immutable.rs make writes_through_immutable_pointer a hard error 2024-08-17 14:49:35 +02:00
ub-write-through-immutable.stderr make writes_through_immutable_pointer a hard error 2024-08-17 14:49:35 +02:00
union_promotion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
union_promotion.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
union-const-eval-field.rs Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
union-const-eval-field.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
union-ice.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
union-ice.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
union-ub.32bit.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
union-ub.64bit.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
union-ub.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-broken-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-broken-const.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unwind-abort.rs Remove c_unwind from tests and fix tests 2024-06-19 13:54:55 +01:00
unwind-abort.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
valid-const.rs Stabilize generic NonZero. 2024-04-22 18:48:47 +02:00
validate_uninhabited_zsts.rs Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
validate_uninhabited_zsts.stderr Always evaluate free constants and statics, even if previous errors occurred 2024-02-19 22:11:13 +00:00
validation-ice-extern-type-field.rs don't ICE when encountering an extern type field during validation 2024-06-22 17:39:01 +02:00
validation-ice-extern-type-field.stderr don't ICE when encountering an extern type field during validation 2024-06-22 17:39:01 +02:00
write-to-uninhabited-enum-variant.rs Update tests 2024-08-10 12:07:17 +02:00
zst_operand_eval.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00