<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/tuple, 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>2025-08-22T17:55:15+00:00</updated>
<entry>
<title>On E0277, point at type that doesn't implement bound</title>
<updated>2025-08-22T17:55:15+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-08-19T17:49:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=049c32797b5f797d5823cdc0e5aaeb0fd68175da'/>
<id>urn:sha1:049c32797b5f797d5823cdc0e5aaeb0fd68175da</id>
<content type='text'>
When encountering an unmet trait bound, point at local type that doesn't implement the trait:

```
error[E0277]: the trait bound `Bar&lt;T&gt;: Foo` is not satisfied
  --&gt; $DIR/issue-64855.rs:9:19
   |
LL | pub struct Bar&lt;T&gt;(&lt;Self as Foo&gt;::Type) where Self: ;
   |                   ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Foo` is not implemented for `Bar&lt;T&gt;`
  --&gt; $DIR/issue-64855.rs:9:1
   |
LL | pub struct Bar&lt;T&gt;(&lt;Self as Foo&gt;::Type) where Self: ;
   | ^^^^^^^^^^^^^^^^^
```
</content>
</entry>
<entry>
<title>Do not provide field typo suggestions for tuples and tuple structs</title>
<updated>2025-08-07T21:39:00+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-07-30T16:21:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a17e8cfe8f64ed8c14ffa44081f518b617bfbe35'/>
<id>urn:sha1:a17e8cfe8f64ed8c14ffa44081f518b617bfbe35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not suggest pinning missing `.get_ref()`</title>
<updated>2025-08-07T21:39:00+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-07-29T20:14:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dd3b8255ca6215b5129181ceb6912aed1370bdce'/>
<id>urn:sha1:dd3b8255ca6215b5129181ceb6912aed1370bdce</id>
<content type='text'>
When suggesting field access which would encounter a method not found, do not suggest pinning when those methods are on `impl Pin` itself.

```
error[E0599]: no method named `get_ref` found for tuple `(BufReader&lt;File&gt;,)` in the current scope
  --&gt; $DIR/missing-field-access.rs:11:15
   |
LL |     let x = f.get_ref();
   |               ^^^^^^^ method not found in `(BufReader&lt;File&gt;,)`
   |
help: one of the expressions' fields has a method of the same name
   |
LL |     let x = f.0.get_ref();
   |               ++
```
instead of
```
error[E0599]: no method named `get_ref` found for tuple `(BufReader&lt;File&gt;,)` in the current scope
  --&gt; $DIR/missing-field-access.rs:11:15
   |
LL |     let x = f.get_ref();
   |               ^^^^^^^ method not found in `(BufReader&lt;File&gt;,)`
   |
help: one of the expressions' fields has a method of the same name
   |
LL |     let x = f.0.get_ref();
   |               ++
help: consider pinning the expression
   |
LL ~     let mut pinned = std::pin::pin!(f);
LL ~     let x = pinned.as_ref().get_ref();
   |
```
</content>
</entry>
<entry>
<title>Account for bare tuples in field searching logic</title>
<updated>2025-08-07T21:39:00+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2025-07-29T18:39:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=26c12c746296e01c2dc13d8078b0a2f1569fcb1c'/>
<id>urn:sha1:26c12c746296e01c2dc13d8078b0a2f1569fcb1c</id>
<content type='text'>
When looking for the field names and types of a given type, account for tuples. This allows suggestions for incorrectly nested field accesses and field name typos to trigger as intended. Previously these suggestions only worked on `ty::Adt`, including tuple structs which are no different to tuples, so they should behave the same in suggestions.

```
error[E0599]: no method named `get_ref` found for tuple `(BufReader&lt;File&gt;,)` in the current scope
  --&gt; $DIR/missing-field-access.rs:11:15
   |
LL |     let x = f.get_ref();
   |               ^^^^^^^ method not found in `(BufReader&lt;File&gt;,)`
   |
help: one of the expressions' fields has a method of the same name
   |
LL |     let x = f.0.get_ref();
   |               ++
```
</content>
</entry>
<entry>
<title>Use non-2015 edition paths in tests that do not test for their resolution</title>
<updated>2025-06-05T07:19:31+00:00</updated>
<author>
<name>Lukas Wirth</name>
<email>lukas.wirth@ferrous-systems.com</email>
</author>
<published>2025-06-05T06:41:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=46326e159f5008c1dca78911442167d5dee07b64'/>
<id>urn:sha1:46326e159f5008c1dca78911442167d5dee07b64</id>
<content type='text'>
</content>
</entry>
<entry>
<title>compiletest: Make diagnostic kind mandatory on line annotations</title>
<updated>2025-04-30T07:44:24+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2025-04-05T16:19:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=20faf8532b5ddeb636ba3078344b0cad058c8f8a'/>
<id>urn:sha1:20faf8532b5ddeb636ba3078344b0cad058c8f8a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Show diff suggestion format on verbose replacement</title>
<updated>2025-02-10T20:21:39+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-07-09T22:30:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d'/>
<id>urn:sha1:f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d</id>
<content type='text'>
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --&gt; $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
</content>
</entry>
<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>Don't suggest restricting bound with unstable traits on stable</title>
<updated>2024-12-07T21:10:44+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-11-27T03:20:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=68253e14ee3d0e81881bc908b07b5ba141daf226'/>
<id>urn:sha1:68253e14ee3d0e81881bc908b07b5ba141daf226</id>
<content type='text'>
On nightly, we mention the trait is unstable

```
error[E0277]: the trait bound `T: Unstable` is not satisfied
  --&gt; $DIR/unstable-trait-suggestion.rs:13:9
   |
LL |     foo(t)
   |     --- ^ the trait `Unstable` is not implemented for `T`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --&gt; $DIR/unstable-trait-suggestion.rs:9:11
   |
LL | fn foo&lt;T: Unstable&gt;(_: T) {}
   |           ^^^^^^^^ required by this bound in `foo`
help: consider restricting type parameter `T` but it is an `unstable` trait
   |
LL | pub fn demo&lt;T: Unstable&gt;(t: T) {
   |              ++++++++++
```

On stable, we don't suggest the trait at all

```
error[E0277]: the trait bound `T: Unstable` is not satisfied
  --&gt; $DIR/unstable-trait-suggestion.rs:13:9
   |
LL |     foo(t)
   |     --- ^ the trait `Unstable` is not implemented for `T`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --&gt; $DIR/unstable-trait-suggestion.rs:9:11
   |
LL | fn foo&lt;T: Unstable&gt;(_: T) {}
   |           ^^^^^^^^ required by this bound in `foo`
```
</content>
</entry>
</feed>
