about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-11 18:08:41 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-18 18:20:35 +0000
commit33bd4bdeb597d3e8579fbee6b2753f35ac381294 (patch)
treeacd2bca3c2a2310bc73d0f3d3e0377c391d5973d /compiler/rustc_pattern_analysis/src
parentec7a188f16a6ec1f2e29f5d721f8ee5b92e2c99f (diff)
downloadrust-33bd4bdeb597d3e8579fbee6b2753f35ac381294.tar.gz
rust-33bd4bdeb597d3e8579fbee6b2753f35ac381294.zip
Tweak "field not found" suggestion when giving struct literal for tuple struct type
```
error[E0560]: struct `S` has no field named `x`
  --> $DIR/nested-non-tuple-tuple-struct.rs:8:19
   |
LL | pub struct S(f32, f32);
   |            - `S` defined here
...
LL |     let _x = (S { x: 1.0, y: 2.0 }, S { x: 3.0, y: 4.0 });
   |                   ^ field does not exist
   |
help: `S` is a tuple struct, use the appropriate syntax
   |
LL |     let _x = (S(/* f32 */, /* f32 */), S { x: 3.0, y: 4.0 });
   |               ~~~~~~~~~~~~~~~~~~~~~~~
```
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions