<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_ssa/src/errors.rs, branch 1.79.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.79.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.79.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-03-16T19:22:05+00:00</updated>
<entry>
<title>Handle calls to upstream monomorphizations in compiler_builtins</title>
<updated>2024-03-16T19:22:05+00:00</updated>
<author>
<name>Ben Kimock</name>
<email>kimockb@gmail.com</email>
</author>
<published>2024-03-15T18:13:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5f4f2526b84e585842bc94c74a56588ec0154c10'/>
<id>urn:sha1:5f4f2526b84e585842bc94c74a56588ec0154c10</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `IntoDiagnostic` as `Diagnostic`.</title>
<updated>2024-03-10T22:15:09+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-03-06T00:02:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7a294e998b66ea6d410a6840cba80347fc4764c2'/>
<id>urn:sha1:7a294e998b66ea6d410a6840cba80347fc4764c2</id>
<content type='text'>
To match `derive(Diagnostic)`.

Also rename `into_diagnostic` as `into_diag`.
</content>
</entry>
<entry>
<title>Rename `IntoDiagnosticArg` as `IntoDiagArg`.</title>
<updated>2024-03-10T22:12:19+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-03-05T05:53:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a09b1d33a703d4ed412e70d3197e73ba7e0937f9'/>
<id>urn:sha1:a09b1d33a703d4ed412e70d3197e73ba7e0937f9</id>
<content type='text'>
Also rename `into_diagnostic_arg` as `into_diag_arg`, and
`NotIntoDiagnosticArg` as `NotInotDiagArg`.
</content>
</entry>
<entry>
<title>Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`.</title>
<updated>2024-02-27T21:55:37+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-23T03:37:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8199632aa88c15f8e8cba942b9e6c38826b141dd'/>
<id>urn:sha1:8199632aa88c15f8e8cba942b9e6c38826b141dd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `DiagnosticBuilder` as `Diag`.</title>
<updated>2024-02-27T21:55:35+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-22T23:20:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=899cb40809a85eb9d89f6da3268713b83175360a'/>
<id>urn:sha1:899cb40809a85eb9d89f6da3268713b83175360a</id>
<content type='text'>
Much better!

Note that this involves renaming (and updating the value of)
`DIAGNOSTIC_BUILDER` in clippy.
</content>
</entry>
<entry>
<title>check that simd_insert/extract indices are in-bounds</title>
<updated>2024-02-23T18:43:59+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-02-23T18:22:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8e0dd993d63d179402b0f5330aadfe589069b387'/>
<id>urn:sha1:8e0dd993d63d179402b0f5330aadfe589069b387</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use better heuristic for printing Cargo specific diagnostics</title>
<updated>2024-02-17T15:49:01+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2024-02-17T15:45:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d988d8f4ba069e11ace537feea4e4e226e7f4afe'/>
<id>urn:sha1:d988d8f4ba069e11ace537feea4e4e226e7f4afe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Turn the "no saved object file in work product" ICE into a translatable fatal error</title>
<updated>2024-02-10T01:22:15+00:00</updated>
<author>
<name>Ben Kimock</name>
<email>kimockb@gmail.com</email>
</author>
<published>2024-02-10T01:22:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3d4a9f504780dd8f9ba4e7921cce8d8517c20aa6'/>
<id>urn:sha1:3d4a9f504780dd8f9ba4e7921cce8d8517c20aa6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove the lifetime from `DiagnosticArgValue`.</title>
<updated>2024-01-30T07:46:06+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-30T04:27:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5350edb9e8f4e194a2cad9a41b81d97a8ed52fab'/>
<id>urn:sha1:5350edb9e8f4e194a2cad9a41b81d97a8ed52fab</id>
<content type='text'>
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 `&amp;str` with `as_str`,
but that' no big deal, and worth it for the simplifications elsewhere.
</content>
</entry>
<entry>
<title>Stop using `String` for error codes.</title>
<updated>2024-01-28T20:41:41+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-13T23:57:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5d9dfbd08f38c2a9bc71d39de8f5c7776afe0f9e'/>
<id>urn:sha1:5d9dfbd08f38c2a9bc71d39de8f5c7776afe0f9e</id>
<content type='text'>
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.
</content>
</entry>
</feed>
