<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/errors.rs, 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-15T09:14:45+00:00</updated>
<entry>
<title>Use an error struct instead of a panic</title>
<updated>2024-05-15T09:14:45+00:00</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2024-05-15T08:01:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b780fa9219c4c921e3334971a9e673e22cbea375'/>
<id>urn:sha1:b780fa9219c4c921e3334971a9e673e22cbea375</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 `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>Overhaul `Diagnostic` args.</title>
<updated>2024-02-22T01:51:05+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-15T19:07:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b38ed1afa6cae65e5895f419ab8af98bdf5af840'/>
<id>urn:sha1:b38ed1afa6cae65e5895f419ab8af98bdf5af840</id>
<content type='text'>
First, introduce a typedef `DiagnosticArgMap`.

Second, make the `args` field public, and remove the `args` getter and
`replace_args` setter. These were necessary previously because the getter
had a `#[allow(rustc::potential_query_instability)]` attribute, but that
was removed in #120931 when the args were changed from `FxHashMap` to
`FxIndexMap`. (All the other `Diagnostic` fields are public.)
</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>Rollup merge of #120631 - saethlin:invalid-target-ice, r=compiler-errors</title>
<updated>2024-02-06T18:40:08+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-02-06T18:40:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8906977542ea23455c95ad42a5faca1ee3bc437d'/>
<id>urn:sha1:8906977542ea23455c95ad42a5faca1ee3bc437d</id>
<content type='text'>
Emit a diagnostic for invalid target options

This turns the ICE in https://github.com/rust-lang/rust/issues/120625 into a translatable diagnostic.
</content>
</entry>
<entry>
<title>Emit a diagnostic for invalid target options</title>
<updated>2024-02-04T03:03:25+00:00</updated>
<author>
<name>Ben Kimock</name>
<email>kimockb@gmail.com</email>
</author>
<published>2024-02-04T00:57:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=934618fe472727cf5e45535c945516c2c62dd75e'/>
<id>urn:sha1:934618fe472727cf5e45535c945516c2c62dd75e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>`Diagnostic` cleanups</title>
<updated>2024-02-02T22:02:50+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-01T08:17:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a9a2e1565abbeae741d6d715224194caf500099b'/>
<id>urn:sha1:a9a2e1565abbeae741d6d715224194caf500099b</id>
<content type='text'>
- `emitted_at` isn't used outside the crate.
- `code` and `messages` are public fields, so there's no point have
  trivial getters/setters for them.
- `suggestions` is public, so the comment about "functionality on
  `Diagnostic`" isn't needed.
</content>
</entry>
<entry>
<title>llvm: simplify data layout check</title>
<updated>2024-01-18T10:46:03+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood@huawei.com</email>
</author>
<published>2024-01-17T14:26:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=46652dd254bc9c413d14cec637c7f21ac6601e05'/>
<id>urn:sha1:46652dd254bc9c413d14cec637c7f21ac6601e05</id>
<content type='text'>
Don't skip the inconsistent data layout check for custom LLVMs.

With #118708, all targets will have a simple test that would trigger this
check if LLVM's data layouts do change - so data layouts would be
corrected during the LLVM upgrade. Therefore, with builtin targets, this
check won't trigger with our LLVM because each target will have been
confirmed to work. With non-builtin targets, this check is probably
useful to have because you can change the data layout in your target and
if its wrong then that could lead to bugs.

When using a custom LLVM, the same justification makes sense for
non-builtin targets as with our LLVM, the user can update their target to
match their LLVM and that's probably a good thing to do. However, with
a custom LLVM, the user cannot change the builtin target data layouts if
they don't match - though given that the compiler's data layout is used
for layout computation and a bunch of other things - you could get some
bugs because of the mismatch and probably want to know about that.

`CFG_LLVM_ROOT` was also always set during local development with
`download-ci-llvm` so this bug would never trigger locally.

Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</content>
</entry>
<entry>
<title>Rename consuming chaining methods on `DiagnosticBuilder`.</title>
<updated>2024-01-09T20:40:00+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-08T22:08:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ed76b0b882d0acff9295bcd76c2b119cf83e7219'/>
<id>urn:sha1:ed76b0b882d0acff9295bcd76c2b119cf83e7219</id>
<content type='text'>
In #119606 I added them and used a `_mv` suffix, but that wasn't great.

A `with_` prefix has three different existing uses.
- Constructors, e.g. `Vec::with_capacity`.
- Wrappers that provide an environment to execute some code, e.g.
  `with_session_globals`.
- Consuming chaining methods, e.g. `Span::with_{lo,hi,ctxt}`.

The third case is exactly what we want, so this commit changes
`DiagnosticBuilder::foo_mv` to `DiagnosticBuilder::with_foo`.

Thanks to @compiler-errors for the suggestion.
</content>
</entry>
</feed>
