<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_gcc/src/errors.rs, branch 1.82.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.82.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.82.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-06-18T15:42:11+00:00</updated>
<entry>
<title>Remove redundant argument from `subdiagnostic` method</title>
<updated>2024-06-18T15:42:11+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2024-06-18T11:10:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3f34196839730cfb5b241667cfcc9b94599ea0c1'/>
<id>urn:sha1:3f34196839730cfb5b241667cfcc9b94599ea0c1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use a dedicated type instead of a reference for the diagnostic context</title>
<updated>2024-06-18T15:42:11+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2024-06-18T10:35:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186'/>
<id>urn:sha1:7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186</id>
<content type='text'>
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
</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>Merge commit 'b385428e3ddf330805241e7758e773f933357c4b' into subtree-update_cg_gcc_2024-03-05</title>
<updated>2024-03-05T18:58:36+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2024-03-05T18:58:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0d359efbe6dfcd927d4fd6208cdaed0bbaf33bb6'/>
<id>urn:sha1:0d359efbe6dfcd927d4fd6208cdaed0bbaf33bb6</id>
<content type='text'>
</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>errors: only eagerly translate subdiagnostics</title>
<updated>2024-02-15T10:34:41+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood@huawei.com</email>
</author>
<published>2024-02-14T14:17:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b80fc5d4e8ce95a00b14a50e8ee0561b64736480'/>
<id>urn:sha1:b80fc5d4e8ce95a00b14a50e8ee0561b64736480</id>
<content type='text'>
Subdiagnostics don't need to be lazily translated, they can always be
eagerly translated. Eager translation is slightly more complex as we need
to have a `DiagCtxt` available to perform the translation, which involves
slightly more threading of that context.

This slight increase in complexity should enable later simplifications -
like passing `DiagCtxt` into `AddToDiagnostic` and moving Fluent messages
into the diagnostic structs rather than having them in separate files
(working on that was what led to this change).

Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</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>Rename some `Diagnostic` setters.</title>
<updated>2024-01-03T08:40:20+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-23T22:08:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=505c1371d070ba6c9e15db7d331f2d6a2b167b68'/>
<id>urn:sha1:505c1371d070ba6c9e15db7d331f2d6a2b167b68</id>
<content type='text'>
`Diagnostic` has 40 methods that return `&amp;mut Self` and could be
considered setters. Four of them have a `set_` prefix. This doesn't seem
necessary for a type that implements the builder pattern. This commit
removes the `set_` prefixes on those four methods.
</content>
</entry>
<entry>
<title>Add `level` arg to `into_diagnostic`.</title>
<updated>2023-12-18T22:19:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-18T03:12:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e7724a2e319f112ee6a97999976d8225b009456e'/>
<id>urn:sha1:e7724a2e319f112ee6a97999976d8225b009456e</id>
<content type='text'>
And make all hand-written `IntoDiagnostic` impls generic, by using
`DiagnosticBuilder::new(dcx, level, ...)` instead of e.g.
`dcx.struct_err(...)`.

This means the `create_*` functions are the source of the error level.
This change will let us remove `struct_diagnostic`.

Note: `#[rustc_lint_diagnostics]` is added to `DiagnosticBuilder::new`,
it's necessary to pass diagnostics tests now that it's used in
`into_diagnostic` functions.
</content>
</entry>
</feed>
