Ralf Jung
05834b2d6b
improve validation error messages: show surrounding type, and more info on dyn-downcast
2026-03-19 16:37:00 +01:00
Jonathan Brouwer
f5a1fc75ad
Update uitests
2026-01-18 22:41:00 +01:00
Ralf Jung
3d7c9bdbb7
const validation: remove check for mutable refs in final value of const
2025-11-09 14:32:01 +01:00
Sasha Pourcelot
5c4b61b4b4
don't uppercase error messages
...
a more general version of https://github.com/rust-lang/rust/pull/146080 .
after a bit of hacking in [`fluent.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_fluent_macro/src/fluent.rs ), i discovered that i'm not the only one that is bad at following guidelines 😅 . this pr lowercases the first letter of all the error messages in the codebase.
(i did not change things that are traditionally uppercased such as _MIR_, _ABI_ or _C_)
i think it's reasonable to run a `@bors try` so all the test suite is checked, as i cannot run some of the tests on my machine. i double checked (and replaced manually) all the old error messages, but better be safe than sorry.
in the future i will try to add a check in `x test tidy` that errors if an error message starts with an uppercase letter.
2025-09-03 15:24:49 +02:00
Ralf Jung
d0fa0260ca
const checks: avoid 'top-level scope' terminology
2025-06-27 17:03:48 +02:00
Ralf Jung
bade3fd058
clarify and unify 'transient mutable borrow' errors
2025-06-26 18:11:24 +02:00
Ralf Jung
ff17a225e6
add more sensible mut-ref-to-immutable test
2025-06-26 18:09:48 +02:00
Ralf Jung
492526548d
const-eval: allow constants to refer to mutable/external memory, but reject such constants as patterns
2025-06-26 18:09:47 +02:00
Mara Bos
ff5ba7aa74
Update tests.
2025-06-13 09:20:48 +02:00
Oli Scherer
b331b8b96d
Use the informative error as the main const eval error message
2025-06-02 15:37:15 +00:00
Vadim Petrochenkov
20faf8532b
compiletest: Make diagnostic kind mandatory on line annotations
2025-04-30 10:44:24 +03:00
Zalathar
835fbcbcab
Remove the -test suffix from normalize directives
2024-12-27 19:58:16 +11:00
Ralf Jung
ed8ee39930
fix ICE on type error in promoted
2024-12-09 15:17:26 +01:00
Ralf Jung
a17294dc0f
fix ICE when promoted has layout size overflow
2024-12-01 19:52:27 +01:00
Ding Xiang Fei
1576a6d618
Stabilize const_refs_to_static
...
update tests
fix bitwidth-sensitive stderr output
use build-fail for asm tests
2024-09-26 13:21:15 +02:00
Ralf Jung
7dfffe7e70
const: don't ICE when encountering a mutable ref to immutable memory
2024-09-15 22:53:04 +02:00
Ralf Jung
3175cc2814
stabilize const_mut_refs
2024-09-15 09:51:32 +02:00
Ralf Jung
79503dd742
stabilize raw_ref_op
2024-08-18 19:46:53 +02:00
Zalathar
9aaa0c5867
Always use a colon in //@ normalize-*: headers
2024-07-11 12:23:44 +10:00
Oli Scherer
77fe9f0a72
Validate before reporting interning errors.
...
validation produces much higher quality errors and already handles most of the cases
2024-04-17 09:50:44 +00:00
Ralf Jung
3cc8c8d44b
allow statics pointing to mutable statics
2024-02-29 09:34:15 +01:00
Oli Scherer
9062697917
Always evaluate free constants and statics, even if previous errors occurred
2024-02-19 22:11:13 +00:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives
2024-02-16 20:02:50 +00:00
Ralf Jung
d3fc69ae45
add test ensuring we detect a static actually having a mutable reference
2024-02-16 11:38:11 +01:00
Ralf Jung
2611fac03f
add back some more attempts at having &mut in the final value of a const/static
2024-02-16 10:09:12 +01:00
Ralf Jung
f68e79dcac
remove stderr-per-bitwidth from some tests
2024-02-16 10:09:12 +01:00
Ralf Jung
0702701297
allow mutable references in const values when they point to no memory
2024-02-16 10:09:12 +01:00
Ralf Jung
2f1a8e2d7a
const-eval interner: from-scratch rewrite using mutability information from provenance rather than types
2024-01-22 09:28:00 +01:00
George-lewis
d56cdd48cb
Bless tests
...
Update tests
2024-01-13 12:46:58 -05:00
Nilstrieb
41e8d152dc
Show number in error message even for one error
...
Co-authored-by: Adrian <adrian.iosdev@gmail.com >
2023-11-24 19:15:52 +01:00
Ralf Jung
b1ebf002c3
don't UB on dangling ptr deref, instead check inbounds on projections
2023-10-15 18:12:46 +02:00
Tomasz Miąsko
67f455afe1
Suppress "erroneous constant used" for constants tainted by errors
...
When constant evaluation fails because its MIR is tainted by errors,
suppress note indicating that erroneous constant was used, since those
errors have to be fixed regardless of the constant being used or not.
2023-05-15 00:00:00 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests
2023-01-11 09:32:08 +00:00