<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_errors/src, branch 1.63.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.63.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.63.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-06-17T17:30:16+00:00</updated>
<entry>
<title>Auto merge of #97892 - klensy:fix-spaces, r=oli-obk</title>
<updated>2022-06-17T17:30:16+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-06-17T17:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0cb9899e780bcefb9008088c1e6d6cd5fe2593b4'/>
<id>urn:sha1:0cb9899e780bcefb9008088c1e6d6cd5fe2593b4</id>
<content type='text'>
diagnostics: remove trailing spaces

Remove few occurrences of trailing spaces and drive by fix of needless alloc of const string.
</content>
</entry>
<entry>
<title>Rollup merge of #97798 - WaffleLapkin:allow_for_suggestions_that_are_quite_far_away_from_each_other, r=estebank</title>
<updated>2022-06-17T10:21:48+00:00</updated>
<author>
<name>Dylan DPC</name>
<email>99973273+Dylan-DPC@users.noreply.github.com</email>
</author>
<published>2022-06-17T10:21:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=74aa55b3fcae638ce3df9111ef7822474f9a2b61'/>
<id>urn:sha1:74aa55b3fcae638ce3df9111ef7822474f9a2b61</id>
<content type='text'>
Hide irrelevant lines in suggestions to allow for suggestions that are far from each other to be shown

This is an attempt to fix suggestions one part of which is 6 lines or more far from the first. I've noticed "the problem" (of not showing some parts of the suggestion) here: https://github.com/rust-lang/rust/pull/97759#discussion_r889689230.

I'm not sure about the implementation (this big closure is just bad and makes already complicated code even more so), but I want to at least discuss the result.

Here is an example of how this changes the output:

Before:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () =&gt; break 'l,
4 |
5 |
6 |
7 |
8 |
...
```

After:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () =&gt; break 'l,
4 |
...
31|
32~ } };
  |
```

r? `@estebank`
`@rustbot` label +A-diagnostics +A-suggestion-diagnostics
</content>
</entry>
<entry>
<title>Add back MAX_SUGGESTION_HIGHLIGHT_LINES so clippy is happy &amp; buildable</title>
<updated>2022-06-16T13:08:26+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-13T14:28:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3c55672795bdc4473bbaa1922c1703916839c4aa'/>
<id>urn:sha1:3c55672795bdc4473bbaa1922c1703916839c4aa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Try to clean up code...</title>
<updated>2022-06-16T13:08:26+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-13T11:22:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cf6f821c3372b5ddc3cb0a92afcc48a1e0313efa'/>
<id>urn:sha1:cf6f821c3372b5ddc3cb0a92afcc48a1e0313efa</id>
<content type='text'>
I'm not sure if I succeeded
</content>
</entry>
<entry>
<title>Improve suggestions when its parts are far from each other</title>
<updated>2022-06-16T13:08:26+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-06T14:04:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=87fded1eddf834f2decbfd05e6fda35cb1ee4747'/>
<id>urn:sha1:87fded1eddf834f2decbfd05e6fda35cb1ee4747</id>
<content type='text'>
Previously we only show at most 6 lines of suggestions and, if the
suggestions are more than 6 lines apart, we've just showed ... at the
end. This is probably fine, but quite confusing in my opinion.

This commit is an attempt to show ... in places where there is nothing
to suggest instead, for example:

Before:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () =&gt; break 'l,
4 |
5 |
6 |
7 |
8 |
...
```

After:
```text
help: consider enclosing expression in a block
  |
3 ~     'l: { match () { () =&gt; break 'l,
4 |
...
31|
32~ } };
  |
```
</content>
</entry>
<entry>
<title>Fix a typo</title>
<updated>2022-06-16T13:08:26+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-06T13:42:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=260c5fd58778f14c4f4d19e1b91784a4e0a675e3'/>
<id>urn:sha1:260c5fd58778f14c4f4d19e1b91784a4e0a675e3</id>
<content type='text'>
!(a &amp; b) = !a | !b
</content>
</entry>
<entry>
<title>drive by fix needless allocation of const string number</title>
<updated>2022-06-16T11:40:30+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2022-06-08T18:23:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=68ea8ff16f74be00797a237f8fd438b1d097ab5a'/>
<id>urn:sha1:68ea8ff16f74be00797a237f8fd438b1d097ab5a</id>
<content type='text'>
</content>
</entry>
<entry>
<title> fix one more case of trailing space</title>
<updated>2022-06-16T11:40:29+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2022-06-08T18:07:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=989d1a732f194d852e9a3636fc283c65612f995f'/>
<id>urn:sha1:989d1a732f194d852e9a3636fc283c65612f995f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>diagnostics: fix trailing space</title>
<updated>2022-06-16T11:40:28+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2022-06-08T17:34:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0ff8ae3111939a30d61f158b53e120f965989520'/>
<id>urn:sha1:0ff8ae3111939a30d61f158b53e120f965989520</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #97757 - xFrednet:rfc-2383-expect-with-force-warn, r=wesleywiser,flip1995</title>
<updated>2022-06-16T07:10:20+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2022-06-16T07:10:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=95be954af412e4473499a3745c84583c545f15e5'/>
<id>urn:sha1:95be954af412e4473499a3745c84583c545f15e5</id>
<content type='text'>
Support lint expectations for `--force-warn` lints (RFC 2383)

Rustc has a `--force-warn` flag, which overrides lint level attributes and forces the diagnostics to always be warn. This means, that for lint expectations, the diagnostic can't be suppressed as usual. This also means that the expectation would not be fulfilled, even if a lint had been triggered in the expected scope.

This PR now also tracks the expectation ID in the `ForceWarn` level. I've also made some minor adjustments, to possibly catch more bugs and make the whole implementation more robust.

This will probably conflict with https://github.com/rust-lang/rust/pull/97718. That PR should ideally be reviewed and merged first. The conflict itself will be trivial to fix.

---

r? `@wesleywiser`

cc: `@flip1995` since you've helped with the initial review and also discussed this topic with me. :upside_down_face:

Follow-up of: https://github.com/rust-lang/rust/pull/87835

Issue: https://github.com/rust-lang/rust/issues/85549

Yeah, and that's it.
</content>
</entry>
</feed>
