<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/tools/error_index_generator, branch 1.77.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.77.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.77.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-01-28T20:41:41+00:00</updated>
<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>
<entry>
<title>Rename `EarlyErrorHandler` as `EarlyDiagCtxt`.</title>
<updated>2023-12-18T05:06:21+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-17T11:01:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cce1701c4c3c37c96753ddb15fd822e71558d141'/>
<id>urn:sha1:cce1701c4c3c37c96753ddb15fd822e71558d141</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_log: provide a way to init logging based on the values, not names, of the env vars</title>
<updated>2023-11-11T14:24:33+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2023-11-11T12:34:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=581a317bbbbad807fd88eab490516787f1e9249e'/>
<id>urn:sha1:581a317bbbbad807fd88eab490516787f1e9249e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide more context for `rustc +nightly -Zunstable-options` on stable</title>
<updated>2023-06-27T15:23:33+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2023-06-22T21:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cef812bd958d5037224aebe3721f3ffc9c80965e'/>
<id>urn:sha1:cef812bd958d5037224aebe3721f3ffc9c80965e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor: improve `error-index-generator` dependency</title>
<updated>2023-02-26T07:13:06+00:00</updated>
<author>
<name>Ezra Shaw</name>
<email>ezrasure@outlook.com</email>
</author>
<published>2023-02-25T09:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=53044158eff0d64673a6100f701c57b484232aca'/>
<id>urn:sha1:53044158eff0d64673a6100f701c57b484232aca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor: statically guarantee that current error codes are documented</title>
<updated>2023-02-26T07:12:36+00:00</updated>
<author>
<name>Ezra Shaw</name>
<email>ezrasure@outlook.com</email>
</author>
<published>2023-02-25T07:14:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90677edcba063ee83316ef109e0fe54116015575'/>
<id>urn:sha1:90677edcba063ee83316ef109e0fe54116015575</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: fix issue in  macro</title>
<updated>2023-02-25T09:12:30+00:00</updated>
<author>
<name>Ezra Shaw</name>
<email>ezrasure@outlook.com</email>
</author>
<published>2023-02-25T09:12:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3b51e9fde8e86e6a082922bc7db2f673ed981836'/>
<id>urn:sha1:3b51e9fde8e86e6a082922bc7db2f673ed981836</id>
<content type='text'>
</content>
</entry>
<entry>
<title>error-index: Don't generate 404 instead of removing it.</title>
<updated>2023-01-05T19:07:35+00:00</updated>
<author>
<name>Eric Huss</name>
<email>eric@huss.org</email>
</author>
<published>2023-01-05T14:44:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=72c3082aab3e2df801deeefcc65c7469d93274ca'/>
<id>urn:sha1:72c3082aab3e2df801deeefcc65c7469d93274ca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix error-index redirect to work with back button.</title>
<updated>2023-01-05T19:07:11+00:00</updated>
<author>
<name>Eric Huss</name>
<email>eric@huss.org</email>
</author>
<published>2023-01-05T19:07:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f2ad85a930539986517747729df6082553d195f8'/>
<id>urn:sha1:f2ad85a930539986517747729df6082553d195f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix tooltip display for error codes</title>
<updated>2022-09-17T22:32:28+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2022-09-17T22:32:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f45eacce76b76cd378948d9142d37c08ebdcf4d9'/>
<id>urn:sha1:f45eacce76b76cd378948d9142d37c08ebdcf4d9</id>
<content type='text'>
</content>
</entry>
</feed>
