<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/errors/trait-bound-error-spans, branch automation/bors/try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=automation/bors/try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=automation/bors/try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-12-07T21:29:58+00:00</updated>
<entry>
<title>Use trait name instead of full constraint in suggestion message</title>
<updated>2024-12-07T21:29:58+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-11-28T20:22:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3f2a63a68bbf4e84f7e409659bb64bdd75db39e5'/>
<id>urn:sha1:3f2a63a68bbf4e84f7e409659bb64bdd75db39e5</id>
<content type='text'>
```
help: consider restricting type parameter `T` with traits `Copy` and `Trait`
   |
LL | fn duplicate_custom&lt;T: Copy + Trait&gt;(t: S&lt;T&gt;) -&gt; (S&lt;T&gt;, S&lt;T&gt;) {
   |                      ++++++++++++++
```

```
help: consider restricting type parameter `V` with trait `Copy`
   |
LL | fn index&lt;'a, K, V: std::marker::Copy&gt;(map: &amp;'a HashMap&lt;K, V&gt;, k: K) -&gt; &amp;'a V {
   |                  +++++++++++++++++++
```
</content>
</entry>
<entry>
<title>reword trait bound suggestion message to include the bounds</title>
<updated>2024-12-07T21:26:20+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-11-28T18:43:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d13c34828e4bc0924f7e27bae994f9afecaf0ab4'/>
<id>urn:sha1:d13c34828e4bc0924f7e27bae994f9afecaf0ab4</id>
<content type='text'>
</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>Provide more context on derived obligation error primary label</title>
<updated>2024-01-30T21:28:18+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-01-29T18:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6efddac288643c4b0bc85ea317ea275e6cb4739f'/>
<id>urn:sha1:6efddac288643c4b0bc85ea317ea275e6cb4739f</id>
<content type='text'>
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote:

```
error[E0277]: the trait bound `i32: Bar` is not satisfied
 --&gt; f100.rs:6:6
  |
6 |     &lt;i32 as Foo&gt;::foo();
  |      ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo`
  |
help: this trait has no implementations, consider adding one
 --&gt; f100.rs:2:1
  |
2 | trait Bar {}
  | ^^^^^^^^^
note: required for `i32` to implement `Foo`
 --&gt; f100.rs:3:14
  |
3 | impl&lt;T: Bar&gt; Foo for T {}
  |         ---  ^^^     ^
  |         |
  |         unsatisfied trait bound introduced here
```

Fix #40120.
</content>
</entry>
<entry>
<title>Fix error spans for arguments to tuple enum constructors</title>
<updated>2023-02-28T22:58:14+00:00</updated>
<author>
<name>Nathan Fenner</name>
<email>nfenneremail@gmail.com</email>
</author>
<published>2023-02-28T22:58:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f0212e65321cf4e6a05ac78d44ec242829ffa289'/>
<id>urn:sha1:f0212e65321cf4e6a05ac78d44ec242829ffa289</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Point error span at Some constructor argument when trait resolution fails</title>
<updated>2023-02-28T07:58:35+00:00</updated>
<author>
<name>Nathan Fenner</name>
<email>nfenneremail@gmail.com</email>
</author>
<published>2023-02-28T07:58:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2566b4105d60a422229c645a784186b52e15fde6'/>
<id>urn:sha1:2566b4105d60a422229c645a784186b52e15fde6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Point at specific field in struct literal when trait fulfillment fails</title>
<updated>2023-01-23T21:37:58+00:00</updated>
<author>
<name>Nathan Fenner</name>
<email>nfenneremail@gmail.com</email>
</author>
<published>2023-01-04T03:54:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a67e99d7d234f8f225d963114c85403fff8272c'/>
<id>urn:sha1:2a67e99d7d234f8f225d963114c85403fff8272c</id>
<content type='text'>
</content>
</entry>
</feed>
