]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0026-teach.stderr
Merge commit 'a98e7ab8b94485be6bd03e0c6b8682ecab5b52e6' into clippyup
[rust.git] / src / test / ui / error-codes / E0026-teach.stderr
1 error[E0026]: struct `Thing` does not have a field named `z`
2   --> $DIR/E0026-teach.rs:11:23
3    |
4 LL |         Thing { x, y, z } => {}
5    |                       ^ struct `Thing` does not have this field
6    |
7    = note: This error indicates that a struct pattern attempted to extract a non-existent field from a struct. Struct fields are identified by the name used before the colon : so struct patterns should resemble the declaration of the struct type being matched.
8            
9            If you are using shorthand field patterns but want to refer to the struct field by a different name, you should rename it explicitly.
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0026`.