| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2024-03-05 | Rename `DiagnosticMessage` as `DiagMessage`. | Nicholas Nethercote | -4/+4 | |
| 2024-02-28 | Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`. | Nicholas Nethercote | -3/+3 | |
| 2024-02-03 | Use `DiagnosticArgName` in a few more places. | Nicholas Nethercote | -4/+3 | |
| 2024-01-30 | Remove the lifetime from `DiagnosticArgValue`. | Nicholas Nethercote | -5/+2 | |
| Because it's almost always static. This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial, which is nice. There are a few diagnostics constructed in `compiler/rustc_mir_build/src/check_unsafety.rs` and `compiler/rustc_mir_transform/src/errors.rs` that now need symbols converted to `String` with `to_string` instead of `&str` with `as_str`, but that' no big deal, and worth it for the simplifications elsewhere. | ||||
| 2024-01-29 | Stop using `String` for error codes. | Nicholas Nethercote | -2/+2 | |
| Error codes are integers, but `String` is used everywhere to represent them. Gross! This commit introduces `ErrCode`, an integral newtype for error codes, replacing `String`. It also introduces a constant for every error code, e.g. `E0123`, and removes the `error_code!` macro. The constants are imported wherever used with `use rustc_errors::codes::*`. With the old code, we have three different ways to specify an error code at a use point: ``` error_code!(E0123) // macro call struct_span_code_err!(dcx, span, E0123, "msg"); // bare ident arg to macro call \#[diag(name, code = "E0123")] // string struct Diag; ``` With the new code, they all use the `E0123` constant. ``` E0123 // constant struct_span_code_err!(dcx, span, E0123, "msg"); // constant \#[diag(name, code = E0123)] // constant struct Diag; ``` The commit also changes the structure of the error code definitions: - `rustc_error_codes` now just defines a higher-order macro listing the used error codes and nothing else. - Because that's now the only thing in the `rustc_error_codes` crate, I moved it into the `lib.rs` file and removed the `error_codes.rs` file. - `rustc_errors` uses that macro to define everything, e.g. the error code constants and the `DIAGNOSTIC_TABLES`. This is in its new `codes.rs` file. | ||||
| 2023-09-14 | don't point at const usage site for resolution-time errors | Ralf Jung | -0/+7 | |
| also share the code that emits the actual error | ||||
| 2023-07-27 | Don't attempt to compute layout of type referencing error | Michael Goulet | -0/+3 | |
| 2023-06-01 | Use translatable diagnostics in `rustc_const_eval` | Deadbeef | -0/+55 | |
| 2023-05-16 | Remove `LangItems::require` | Nilstrieb | -1/+9 | |
| It's just a short wrapper used by `tcx.require_lang_item`. Deleting it gives us a negative diff. | ||||
| 2023-04-03 | fix(middle): emit error rather than delay bug when reaching limit | bohan | -0/+8 | |
| 2022-11-21 | Match crate and slug names | mejrs | -0/+8 | |
| 2022-10-30 | better error for rustc_strict_coherence misuse | Michael Goulet | -0/+9 | |
| 2022-10-23 | Migrate all diagnostics | Nilstrieb | -6/+6 | |
| 2022-10-03 | Add diagnostic struct for const eval error in `rustc_middle` | pierwill | -0/+7 | |
| Co-authored-by: Michael Goulet <michael@errs.io> | ||||
| 2022-09-21 | UPDATE - rename SessionSubdiagnostic macro to Subdiagnostic | Jhonny Bill Mena | -1/+1 | |
| Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic" | ||||
| 2022-09-21 | UPDATE - rename DiagnosticHandler macro to Diagnostic | Jhonny Bill Mena | -4/+4 | |
| 2022-09-21 | UPDATE - rename DiagnosticHandler trait to IntoDiagnostic | Jhonny Bill Mena | -4/+4 | |
| 2022-09-05 | fix comment | 111 | -1/+1 | |
| 2022-09-01 | Migrate limit error | 111 | -0/+10 | |
| 2022-09-01 | Migrate OpaqueHiddenType mismatch | 111 | -0/+26 | |
| 2022-09-01 | Migrate DropCheckOverflow | 111 | -0/+14 | |
