diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2021-09-01 20:11:05 -0700 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2021-09-01 20:17:15 -0700 |
| commit | d2b13ba46694b73cf2cd64b3a18c3abd55983f2b (patch) | |
| tree | e7050d44a8df46580b0784af740eea05b6b3f5fe /src/test/ui/numeric | |
| parent | 50171c310cd15e1b2d3723766ce64e2e4d6696fc (diff) | |
| download | rust-d2b13ba46694b73cf2cd64b3a18c3abd55983f2b.tar.gz rust-d2b13ba46694b73cf2cd64b3a18c3abd55983f2b.zip | |
Fix span used for structured tuple struct suggestion
(And same for tuple variants.) Previously, the span was just for the constructor name, which meant it would result in syntactically-invalid code when applied. Now, the span is for the entire expression.
Diffstat (limited to 'src/test/ui/numeric')
| -rw-r--r-- | src/test/ui/numeric/numeric-fields.stderr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/ui/numeric/numeric-fields.stderr b/src/test/ui/numeric/numeric-fields.stderr index 13b6cfae4ec..daf1cbb65bf 100644 --- a/src/test/ui/numeric/numeric-fields.stderr +++ b/src/test/ui/numeric/numeric-fields.stderr @@ -5,8 +5,9 @@ LL | struct S(u8, u16); | - `S` defined here ... LL | let s = S{0b1: 10, 0: 11}; - | - ^^^ field does not exist - | | + | --^^^------------ + | | | + | | field does not exist | help: `S` is a tuple struct, use the appropriate syntax: `S(/* fields */)` error[E0026]: struct `S` does not have a field named `0x1` |
