<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-12-27T08:58:16+00:00</updated>
<entry>
<title>Remove the `-test` suffix from normalize directives</title>
<updated>2024-12-27T08:58:16+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2024-12-25T11:12:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=835fbcbcab82ce728a7233de6c32a2d206e3336c'/>
<id>urn:sha1:835fbcbcab82ce728a7233de6c32a2d206e3336c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `'apostrophes'` from `rustc_parse_format`</title>
<updated>2024-10-14T21:22:51+00:00</updated>
<author>
<name>Lieselotte</name>
<email>52315535+she3py@users.noreply.github.com</email>
</author>
<published>2024-10-14T21:22:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dda3066805ef0a0ad5f2d0d2cdb6bc0b66d8c19b'/>
<id>urn:sha1:dda3066805ef0a0ad5f2d0d2cdb6bc0b66d8c19b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not use question as label</title>
<updated>2024-07-24T21:03:27+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-07-23T19:43:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=850faea030db4b260719d99be4191d7803efdb35'/>
<id>urn:sha1:850faea030db4b260719d99be4191d7803efdb35</id>
<content type='text'>
We don't want to have questions in the diagnostic output. Instead, we use wording that communicates uncertainty, like "might":

```
error[E0432]: unresolved import `spam`
  --&gt; $DIR/import-from-missing-star-3.rs:2:9
   |
LL |     use spam::*;
   |         ^^^^ you might be missing crate `spam`
   |
   = help: consider adding `extern crate spam` to use the `spam` crate
```
</content>
</entry>
<entry>
<title>Always use a colon in `//@ normalize-*:` headers</title>
<updated>2024-07-11T02:23:44+00:00</updated>
<author>
<name>Zalathar</name>
<email>Zalathar@users.noreply.github.com</email>
</author>
<published>2024-06-21T05:15:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9aaa0c5867d7f68ef38dcaeb73b68085b8c4d731'/>
<id>urn:sha1:9aaa0c5867d7f68ef38dcaeb73b68085b8c4d731</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `LintDiagnostic::msg`</title>
<updated>2024-05-23T02:08:35+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-05-22T14:46:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=06bc4fc67145e3a7be9b5a2cf2b5968cef36e587'/>
<id>urn:sha1:06bc4fc67145e3a7be9b5a2cf2b5968cef36e587</id>
<content type='text'>
* instead simply set the primary message inside the lint decorator functions
* it used to be this way before [#]101986 which introduced `msg` to prevent
  good path delayed bugs (which no longer exist) from firing under certain
  circumstances when lints were suppressed / silenced
* this is no longer necessary for various reasons I presume
* it shaves off complexity and makes further changes easier to implement
</content>
</entry>
<entry>
<title>Rename `IntoDiagnosticArg` as `IntoDiagArg`.</title>
<updated>2024-03-10T22:12:19+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-03-05T05:53:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a09b1d33a703d4ed412e70d3197e73ba7e0937f9'/>
<id>urn:sha1:a09b1d33a703d4ed412e70d3197e73ba7e0937f9</id>
<content type='text'>
Also rename `into_diagnostic_arg` as `into_diag_arg`, and
`NotIntoDiagnosticArg` as `NotInotDiagArg`.
</content>
</entry>
<entry>
<title>Rename `SubdiagnosticMessage` as `SubdiagMessage`.</title>
<updated>2024-03-05T01:14:49+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-29T03:53:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=60ea6e2831952110b81fd76190ee66a2f094febd'/>
<id>urn:sha1:60ea6e2831952110b81fd76190ee66a2f094febd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `DiagnosticMessage` as `DiagMessage`.</title>
<updated>2024-03-05T01:14:49+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-29T00:58:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=18715c98c67235274843974c928a70e84946398b'/>
<id>urn:sha1:18715c98c67235274843974c928a70e84946398b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives</title>
<updated>2024-02-22T16:04:04+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2024-02-22T12:10:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e48b96692d63a79a14563f27fe5185f122434f8'/>
<id>urn:sha1:6e48b96692d63a79a14563f27fe5185f122434f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reduce capabilities of `Diagnostic`.</title>
<updated>2024-02-20T02:22:17+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-06T05:44:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f6f87798439e2ce7861da761b444fe0978335ed9'/>
<id>urn:sha1:f6f87798439e2ce7861da761b444fe0978335ed9</id>
<content type='text'>
Currently many diagnostic modifier methods are available on both
`Diagnostic` and `DiagnosticBuilder`. This commit removes most of them
from `Diagnostic`. To minimize the diff size, it keeps them within
`diagnostic.rs` but changes the surrounding `impl Diagnostic` block to
`impl DiagnosticBuilder`. (I intend to move things around later, to give
a more sensible code layout.)

`Diagnostic` keeps a few methods that it still needs, like `sub`,
`arg`, and `replace_args`.

The `forward!` macro, which defined two additional methods per call
(e.g. `note` and `with_note`), is replaced by the `with_fn!` macro,
which defines one additional method per call (e.g. `with_note`). It's
now also only used when necessary -- not all modifier methods currently
need a `with_*` form. (New ones can be easily added as necessary.)

All this also requires changing `trait AddToDiagnostic` so its methods
take `DiagnosticBuilder` instead of `Diagnostic`, which leads to many
mechanical changes. `SubdiagnosticMessageOp` gains a type parameter `G`.

There are three subdiagnostics -- `DelayedAtWithoutNewline`,
`DelayedAtWithNewline`, and `InvalidFlushedDelayedDiagnosticLevel` --
that are created within the diagnostics machinery and appended to
external diagnostics. These are handled at the `Diagnostic` level, which
means it's now hard to construct them via `derive(Diagnostic)`, so
instead we construct them by hand. This has no effect on what they look
like when printed.

There are lots of new `allow` markers for `untranslatable_diagnostics`
and `diagnostics_outside_of_impl`. This is because
`#[rustc_lint_diagnostics]` annotations were present on the `Diagnostic`
modifier methods, but missing from the `DiagnosticBuilder` modifier
methods. They're now present.
</content>
</entry>
</feed>
