<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/const-generics/generic_const_exprs/issue-85848.stderr, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-10-29T16:26:57+00:00</updated>
<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 structured suggestion for unconstrained generic constant</title>
<updated>2024-03-21T00:03:59+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-03-21T00:03:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6b24fdf8113d5f422bfaeff7071d8251a13468b1'/>
<id>urn:sha1:6b24fdf8113d5f422bfaeff7071d8251a13468b1</id>
<content type='text'>
```
error: unconstrained generic constant
  --&gt; $DIR/const-argument-if-length.rs:18:10
   |
LL |     pad: [u8; is_zst::&lt;T&gt;()],
   |          ^^^^^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL | pub struct AtLeastByte&lt;T: ?Sized&gt; where [(); is_zst::&lt;T&gt;()]: {
   |                                   ++++++++++++++++++++++++++
```

Detect when the constant expression isn't `usize` and suggest casting:

```
error: unconstrained generic constant
 --&gt; f300.rs:6:10
  |
6 |     bb::&lt;{!N}&gt;();
  |          ^^^^
-Ztrack-diagnostics: created at compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs:3539:36
  |
help: try adding a `where` bound
  |
5 | fn b&lt;const N: bool&gt;() where [(); {!N} as usize]: {
  |                       ++++++++++++++++++++++++++
```

Fix #122395.
</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>Deduplicate more sized errors on call exprs</title>
<updated>2024-01-24T02:53:15+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-01-24T02:52:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a9841936fe25d3d2841a02abfdb2da2342a3dbcf'/>
<id>urn:sha1:a9841936fe25d3d2841a02abfdb2da2342a3dbcf</id>
<content type='text'>
Change the implicit `Sized` `Obligation` `Span` for call expressions to
include the whole expression. This aids the existing deduplication
machinery to reduce the number of errors caused by a single unsized
expression.
</content>
</entry>
<entry>
<title>Point out if a local trait has no implementations</title>
<updated>2023-09-10T21:20:36+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-09-10T03:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=30e6cea0ae4780bdd99e56fc85719dcb4305c900'/>
<id>urn:sha1:30e6cea0ae4780bdd99e56fc85719dcb4305c900</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Note predicate span on ImplDerivedObligation</title>
<updated>2023-01-11T19:46:45+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-01-11T03:21:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9a39d7e441fb5f879a25d326d6f1546b34d4c531'/>
<id>urn:sha1:9a39d7e441fb5f879a25d326d6f1546b34d4c531</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move /src/test to /tests</title>
<updated>2023-01-11T09:32:08+00:00</updated>
<author>
<name>Albert Larsan</name>
<email>74931857+albertlarsan68@users.noreply.github.com</email>
</author>
<published>2023-01-05T08:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cf2dff2b1e3fa55fa5415d524200070d0d7aacfe'/>
<id>urn:sha1:cf2dff2b1e3fa55fa5415d524200070d0d7aacfe</id>
<content type='text'>
</content>
</entry>
</feed>
