<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/try-block, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-04-10T07:56:37+00:00</updated>
<entry>
<title>replace `//@ compile-flags: --edition` with `//@ edition`</title>
<updated>2025-04-10T07:56:37+00:00</updated>
<author>
<name>Pietro Albini</name>
<email>pietro.albini@ferrous-systems.com</email>
</author>
<published>2025-04-08T13:17:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cd371b90e25a5923f8106cea55b5705061974139'/>
<id>urn:sha1:cd371b90e25a5923f8106cea55b5705061974139</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't mention `FromResidual` on bad `?`</title>
<updated>2025-02-18T17:34:16+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-02-18T17:34:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6eb48824dac44b466ca03fe67760a63d8a45d1dc'/>
<id>urn:sha1:6eb48824dac44b466ca03fe67760a63d8a45d1dc</id>
<content type='text'>
Unless `try_trait_v2` is enabled, don't mention that `FromResidual` isn't implemented for a specific type when the implicit `From` conversion of a `?` fails. For the end user on stable, `?` might as well be a compiler intrinsic, so we remove that note to avoid further confusion and allowing other parts of the error to be more prominent.

```
error[E0277]: `?` couldn't convert the error to `u8`
  --&gt; $DIR/bad-interconversion.rs:4:20
   |
LL | fn result_to_result() -&gt; Result&lt;u64, u8&gt; {
   |                          --------------- expected `u8` because of this
LL |     Ok(Err(123_i32)?)
   |        ------------^ the trait `From&lt;i32&gt;` is not implemented for `u8`
   |        |
   |        this can't be annotated with `?` because it has type `Result&lt;_, i32&gt;`
   |
   = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
   = help: the following other types implement trait `From&lt;T&gt;`:
             `u8` implements `From&lt;Char&gt;`
             `u8` implements `From&lt;bool&gt;`
```
</content>
</entry>
<entry>
<title>Add trait diff highlighting logic and use it in E0277</title>
<updated>2024-11-02T03:08:04+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-10-24T22:16:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b7fc1a743122e3c45f105a5d1169a042a2c6e8bf'/>
<id>urn:sha1:b7fc1a743122e3c45f105a5d1169a042a2c6e8bf</id>
<content type='text'>
When a trait is not implemented for a type, but there *is* an `impl`
for another type or different trait params, we format the output to
use highlighting in the same way that E0308 does for types.

The logic accounts for 3 cases:
- When both the type and trait in the expected predicate and the candidate are different
- When only the types are different
- When only the trait generic params are different

For each case, we use slightly different formatting and wording.
</content>
</entry>
<entry>
<title>Remove detail from label/note that is already available in other note</title>
<updated>2024-10-29T16:26:57+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-10-24T21:14:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5b542866400ad4a294f468cfa7e059d95c27a079'/>
<id>urn:sha1:5b542866400ad4a294f468cfa7e059d95c27a079</id>
<content type='text'>
Remove the "which is required by `{root_obligation}`" post-script in
"the trait `X` is not implemented for `Y`" explanation in E0277. This
information is already conveyed in the notes explaining requirements,
making it redundant while making the text (particularly in labels)
harder to read.

```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
  --&gt; $DIR/wf-static-type.rs:10:13
   |
LL | static FOO: IsCopy&lt;Option&lt;NotCopy&gt;&gt; = IsCopy { t: None };
   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`
   |
   = note: required for `Option&lt;NotCopy&gt;` to implement `Copy`
note: required by a bound in `IsCopy`
  --&gt; $DIR/wf-static-type.rs:7:17
   |
LL | struct IsCopy&lt;T:Copy&gt; { t: T }
   |                 ^^^^ required by this bound in `IsCopy`
```
vs the prior

```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
  --&gt; $DIR/wf-static-type.rs:10:13
   |
LL | static FOO: IsCopy&lt;Option&lt;NotCopy&gt;&gt; = IsCopy { t: None };
   |             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option&lt;NotCopy&gt;: Copy`
   |
   = note: required for `Option&lt;NotCopy&gt;` to implement `Copy`
note: required by a bound in `IsCopy`
  --&gt; $DIR/wf-static-type.rs:7:17
   |
LL | struct IsCopy&lt;T:Copy&gt; { t: T }
   |                 ^^^^ required by this bound in `IsCopy`
```
</content>
</entry>
<entry>
<title>Stop inverting expectation in normalization errors</title>
<updated>2024-10-16T17:44:56+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-10-16T17:44:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=99d5f3b2803daa32909aa841e247ba3ed9efd1b7'/>
<id>urn:sha1:99d5f3b2803daa32909aa841e247ba3ed9efd1b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck</title>
<updated>2024-07-26T18:41:56+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-07-26T18:32:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=91acacf85b9f81aeb41901f8918128bfe02946c8'/>
<id>urn:sha1:91acacf85b9f81aeb41901f8918128bfe02946c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use shorter span for float literal suggestion</title>
<updated>2024-07-04T05:19:35+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-07-03T23:23:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2699d8108cee47a86de22d8ac29344bcadfdbd45'/>
<id>urn:sha1:2699d8108cee47a86de22d8ac29344bcadfdbd45</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix accuracy of `T: Clone` check in suggestion</title>
<updated>2024-04-11T16:41:41+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-03-13T15:37:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5a7caa3174f8174db817228d8c2a02aa4913095c'/>
<id>urn:sha1:5a7caa3174f8174db817228d8c2a02aa4913095c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives</title>
<updated>2024-02-16T20:02:50+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2024-02-16T20:02:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ec2cc761bc7067712ecc7734502f703fe3b024c8'/>
<id>urn:sha1:ec2cc761bc7067712ecc7734502f703fe3b024c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add test for try-block-in-match-arm</title>
<updated>2024-02-01T18:36:34+00:00</updated>
<author>
<name>Jeremiah Senkpiel</name>
<email>fishrock123@rocketmail.com</email>
</author>
<published>2024-02-01T00:58:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bedd81ef2afdf5979e316cde4c664bd13d49b266'/>
<id>urn:sha1:bedd81ef2afdf5979e316cde4c664bd13d49b266</id>
<content type='text'>
This is noted as an implementation concern under the tracking issue for `?` and `try` blocks. (Issue 31436)
</content>
</entry>
</feed>
