Commit graph

14 commits

Author SHA1 Message Date
Oli Scherer
99348a5330 Change CTFE backtraces to use note instead of label to preserve their order
labels are reordered within the file in which they are reported, which can mess up the stack trace
2022-12-06 18:59:46 +00:00
Ralf Jung
1115ec601a cleanup and dedupe CTFE and Miri error reporting 2022-11-16 10:13:29 +01:00
Rageking8
7122abaddf more dupe word typos 2022-10-14 12:57:56 +08:00
Ralf Jung
fd59d44f58 make const_err a hard error 2022-10-07 18:08:49 +02:00
Maybe Waffle
a8f7e244b7 Refactor rustc lint API 2022-10-01 10:03:06 +00:00
Dylan DPC
81f3841cfb
Rollup merge of #101101 - RalfJung:read-pointer-as-bytes, r=oli-obk
interpret: make read-pointer-as-bytes a CTFE-only error with extra information

Next step in the reaction to https://github.com/rust-lang/rust/issues/99923. Also teaches Miri to implicitly strip provenance in more situations when transmuting pointers to integers, which fixes https://github.com/rust-lang/miri/issues/2456.

Pointer-to-int transmutation during CTFE now produces a message like this:
```
   = help: this code performed an operation that depends on the underlying bytes representing a pointer
   = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
```

r? ``@oli-obk``
2022-08-30 11:26:51 +05:30
Ralf Jung
f29c3c421b entirely get rid of NeedsRfc CTFE errors 2022-08-28 13:40:24 -04:00
Ralf Jung
2e172473da interpret: make read-pointer-as-bytes *always* work in Miri
and show some extra information when it happens in CTFE
2022-08-27 18:37:44 -04:00
Ralf Jung
852a111133 interpret: do not prune requires_caller_location stack frames quite so early 2022-06-26 14:42:26 -04:00
b-naber
dbef6e4507 address review 2022-06-14 16:08:18 +02:00
Eduard-Mihai Burtescu
b7e95dee65 rustc_errors: let DiagnosticBuilder::emit return a "guarantee of emission". 2022-02-23 06:38:52 +00:00
Michael Goulet
73ad8df70d Deduplicate lines in long const-eval stack trace 2022-01-11 18:13:53 -08:00
Matthias Krüger
0a5640b55f use matches!() macro in more places 2021-11-06 16:13:14 +01:00
Camille GILLOT
c5fc2609f0 Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02:00
Renamed from compiler/rustc_mir/src/const_eval/error.rs (Browse further)