<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_interface/src/interface.rs, branch 1.78.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.78.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.78.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-03-11T16:29:32+00:00</updated>
<entry>
<title>Rollup merge of #116793 - WaffleLapkin:target_rules_the_backend, r=cjgillot</title>
<updated>2024-03-11T16:29:32+00:00</updated>
<author>
<name>Jubilee</name>
<email>46493976+workingjubilee@users.noreply.github.com</email>
</author>
<published>2024-03-11T16:29:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=86af4d25a55718ba634b8fc0dd4f4d17508c0617'/>
<id>urn:sha1:86af4d25a55718ba634b8fc0dd4f4d17508c0617</id>
<content type='text'>
Allow targets to override default codegen backend

Implements https://github.com/rust-lang/compiler-team/issues/670.
</content>
</entry>
<entry>
<title>Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco</title>
<updated>2024-03-06T21:02:46+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-03-06T21:02:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=efe9deace861039956aa182d8c17c38ef9ef2408'/>
<id>urn:sha1:efe9deace861039956aa182d8c17c38ef9ef2408</id>
<content type='text'>
Rework `untranslatable_diagnostic` lint

Currently it only checks calls to functions marked with `#[rustc_lint_diagnostics]`. This PR changes it to check calls to any function with an `impl Into&lt;{D,Subd}iagnosticMessage&gt;` parameter. This greatly improves its coverage and doesn't rely on people remembering to add `#[rustc_lint_diagnostics]`. It also lets us add `#[rustc_lint_diagnostics]` to a number of functions that don't have an `impl Into&lt;{D,Subd}iagnosticMessage&gt;`, such as `Diag::span`.

r? ``@davidtwco``
</content>
</entry>
<entry>
<title>Rewrite the `untranslatable_diagnostic` lint.</title>
<updated>2024-03-06T03:19:01+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-20T03:12:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b7d58eef4b9e6bd1aa454c3100815fb5d5481a7b'/>
<id>urn:sha1:b7d58eef4b9e6bd1aa454c3100815fb5d5481a7b</id>
<content type='text'>
Currently it only checks calls to functions marked with
`#[rustc_lint_diagnostics]`. This commit changes it to check calls to
any function with an `impl Into&lt;{D,Subd}iagMessage&gt;` parameter. This
greatly improves its coverage and doesn't rely on people remembering to
add `#[rustc_lint_diagnostics]`.

The commit also adds `#[allow(rustc::untranslatable_diagnostic)`]
attributes to places that need it that are caught by the improved lint.
These places that might be easy to convert to translatable diagnostics.

Finally, it also:
- Expands and corrects some comments.
- Does some minor formatting improvements.
- Adds missing `DecorateLint` cases to
  `tests/ui-fulldeps/internal-lints/diagnostics.rs`.
</content>
</entry>
<entry>
<title>errors: share `SilentEmitter` between rustc and rustfmt</title>
<updated>2024-03-05T10:14:36+00:00</updated>
<author>
<name>David Wood</name>
<email>david.wood@huawei.com</email>
</author>
<published>2024-02-19T15:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2ee0409f323574af15c5d75dbfc42b1721720de8'/>
<id>urn:sha1:2ee0409f323574af15c5d75dbfc42b1721720de8</id>
<content type='text'>
Signed-off-by: David Wood &lt;david@davidtw.co&gt;
</content>
</entry>
<entry>
<title>Rename all `ParseSess` variables/fields/lifetimes as `psess`.</title>
<updated>2024-03-04T21:11:45+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-03-04T05:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=80d2bdb6191609c8a3940a1a7959ac1ac16e8ed6'/>
<id>urn:sha1:80d2bdb6191609c8a3940a1a7959ac1ac16e8ed6</id>
<content type='text'>
Existing names for values of this type are `sess`, `parse_sess`,
`parse_session`, and `ps`. `sess` is particularly annoying because
that's also used for `Session` values, which are often co-located, and
it can be difficult to know which type a value named `sess` refers to.
(That annoyance is the main motivation for this change.) `psess` is nice
and short, which is good for a name used this much.

The commit also renames some `parse_sess_created` values as
`psess_created`.
</content>
</entry>
<entry>
<title>Overhaul the handling of errors at the top-level.</title>
<updated>2024-02-21T21:03:47+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-18T23:00:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=72b172bdf631483d0f802c54c8dc8246f6b4e00e'/>
<id>urn:sha1:72b172bdf631483d0f802c54c8dc8246f6b4e00e</id>
<content type='text'>
Currently `emit_stashed_diagnostic` is called from four(!) different
places: `print_error_count`, `DiagCtxtInner::drop`, `abort_if_errors`,
and `compile_status`.

And `flush_delayed` is called from two different places:
`DiagCtxtInner::drop` and `Queries`.

This is pretty gross! Each one should really be called from a single
place, but there's a bunch of entanglements. This commit cleans up this
mess.

Specifically, it:
- Removes all the existing calls to `emit_stashed_diagnostic`, and adds
  a single new call in `finish_diagnostics`.
- Removes the early `flush_delayed` call in `codegen_and_build_linker`,
  replacing it with a simple early return if delayed bugs are present.
- Changes `DiagCtxtInner::drop` and `DiagCtxtInner::flush_delayed` so
  they both assert that the stashed diagnostics are empty (i.e.
  processed beforehand).
- Changes `interface::run_compiler` so that any errors emitted during
  `finish_diagnostics` (i.e. late-emitted stashed diagnostics) are
  counted and cannot be overlooked. This requires adding
  `ErrorGuaranteed` return values to several functions.
- Removes the `stashed_err_count` call in `analysis`. This is possible
  now that we don't have to worry about calling `flush_delayed` early
  from `codegen_and_build_linker` when stashed diagnostics are pending.
- Changes the `span_bug` case in `handle_tuple_field_pattern_match` to a
  `delayed_span_bug`, because it now can be reached due to the removal
  of the `stashed_err_count` call in `analysis`.
- Slightly changes the expected output of three tests. If no errors are
  emitted but there are delayed bugs, the error count is no longer
  printed. This is because delayed bugs are now always printed after the
  error count is printed (or not printed, if the error count is zero).

There is a lot going on in this commit. It's hard to break into smaller
pieces because the existing code is very tangled. It took me a long time
and a lot of effort to understand how the different pieces interact, and
I think the new code is a lot simpler and easier to understand.
</content>
</entry>
<entry>
<title>Refactor out another repeating pattern</title>
<updated>2024-02-18T19:26:45+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2024-02-18T19:26:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6d115f5d9a05380b983dd53d747150c8afbd48d8'/>
<id>urn:sha1:6d115f5d9a05380b983dd53d747150c8afbd48d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor out a repeating pattern with `get_or_default_sysroot`</title>
<updated>2024-02-15T00:09:40+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2024-02-15T00:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5441523f0727639040fdd134abff1e298d88733e'/>
<id>urn:sha1:5441523f0727639040fdd134abff1e298d88733e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow targets to override default codegen backend</title>
<updated>2024-02-14T23:43:00+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2024-02-14T23:43:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a03d19ef63d342c408d7ec8208bda5b4eb0bacf5'/>
<id>urn:sha1:a03d19ef63d342c408d7ec8208bda5b4eb0bacf5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>`SilentEmitter::fatal_note` doesn't need to be optional.</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:18:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8ba25d0989f8d96cbcb4365fc61b469575e22d63'/>
<id>urn:sha1:8ba25d0989f8d96cbcb4365fc61b469575e22d63</id>
<content type='text'>
</content>
</entry>
</feed>
