<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_hir_analysis/src/structured_errors, branch 1.80.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.80.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.80.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-05-30T20:52:33+00:00</updated>
<entry>
<title>Rename HIR `TypeBinding` to `AssocItemConstraint` and related cleanup</title>
<updated>2024-05-30T20:52:33+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-05-27T21:53:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=34c56c45cff1d0029dafd7d19c524975292382af'/>
<id>urn:sha1:34c56c45cff1d0029dafd7d19c524975292382af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename Generics::params to Generics::own_params</title>
<updated>2024-05-10T00:58:46+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-05-10T00:56:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1c19b6ad60d4993fb25c44ee8b6e625791084662'/>
<id>urn:sha1:1c19b6ad60d4993fb25c44ee8b6e625791084662</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suggest _ for missing generic arguments in turbofish</title>
<updated>2024-03-17T17:34:17+00:00</updated>
<author>
<name>Kornel</name>
<email>kornel@geekhood.net</email>
</author>
<published>2024-03-17T17:27:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=55067c539aea52e25b3a33fdeaa52449af78ffa4'/>
<id>urn:sha1:55067c539aea52e25b3a33fdeaa52449af78ffa4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `StructuredDiagnostic` as `StructuredDiag`.</title>
<updated>2024-03-05T01:15:12+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-29T05:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f8429390ec8f335d17744773644e192b74734566'/>
<id>urn:sha1:f8429390ec8f335d17744773644e192b74734566</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>Prefer `DiagnosticBuilder` over `Diagnostic` in diagnostic modifiers.</title>
<updated>2024-02-19T09:23:20+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-31T23:13:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b18f3e11fa9c2d6fb8a6c4807229bebc3608d3ac'/>
<id>urn:sha1:b18f3e11fa9c2d6fb8a6c4807229bebc3608d3ac</id>
<content type='text'>
There are lots of functions that modify a diagnostic. This can be via a
`&amp;mut Diagnostic` or a `&amp;mut DiagnosticBuilder`, because the latter type
wraps the former and impls `DerefMut`.

This commit converts all the `&amp;mut Diagnostic` occurrences to `&amp;mut
DiagnosticBuilder`. This is a step towards greatly simplifying
`Diagnostic`. Some of the relevant function are made generic, because
they deal with both errors and warnings. No function bodies are changed,
because all the modifier methods are available on both `Diagnostic` and
`DiagnosticBuilder`.
</content>
</entry>
<entry>
<title>By tracking import use types to check whether it is scope uses or the other situations like module-relative uses, we can do more accurate redundant import checking.</title>
<updated>2024-02-18T08:38:11+00:00</updated>
<author>
<name>surechen</name>
<email>chenshuo17@huawei.com</email>
</author>
<published>2023-11-10T02:11:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a61126cef6c4083d57e22835033eb2eefdd31bac'/>
<id>urn:sha1:a61126cef6c4083d57e22835033eb2eefdd31bac</id>
<content type='text'>
fixes #117448

For example unnecessary imports in std::prelude that can be eliminated:

```rust
use std::option::Option::Some;//~ WARNING the item `Some` is imported redundantly
use std::option::Option::None; //~ WARNING the item `None` is imported redundantly
```
</content>
</entry>
<entry>
<title>hir: Remove `hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}`</title>
<updated>2024-02-10T09:24:46+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2024-02-09T20:58:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b07283815be70d4e727187f646d5023911491001'/>
<id>urn:sha1:b07283815be70d4e727187f646d5023911491001</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hir: Remove `fn opt_hir_id` and `fn opt_span`</title>
<updated>2024-02-07T06:38:24+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2024-01-21T18:13:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a61019b29021b7635113b48e470dbac724c81c76'/>
<id>urn:sha1:a61019b29021b7635113b48e470dbac724c81c76</id>
<content type='text'>
</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>
