about summary refs log tree commit diff
path: root/src/test/ui/numeric/numeric-fields.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-27/+0
2021-09-13Suggest replacing an inexisting field for an unmentioned fieldHirochika Matsumoto-1/+4
This PR adds a suggestion to replace an inexisting field for an unmentioned field. Given the following code: ```rust enum Foo { Bar { alpha: u8, bravo: u8, charlie: u8 }, } fn foo(foo: Foo) { match foo { Foo::Bar { alpha, beta, // `bravo` miswritten as `beta` here. charlie, } => todo!(), } } ``` the compiler now emits the error messages below. ```text error[E0026]: variant `Foo::Bar` does not have a field named `beta` --> src/lib.rs:9:13 | 9 | beta, // `bravo` miswritten as `beta` here. | ^^^^ | | | variant `Foo::Bar` does not have this field | help: `Foo::Bar` has a field named `bravo`: `bravo` ``` Note that this suggestion is available iff the number of inexisting fields and unmentioned fields are both 1.
2021-09-01Ensure suggestion is in its own diagnostic windowNoah Lev-4/+6
For two reasons: 1. Now that the suggestion span has been corrected, the output is a bit cluttered and hard to read. Putting the suggestion its own window creates more space. 2. It's easier to see what's being suggested, since now the version after the suggestion is applied is shown.
2021-09-01Fix span used for structured tuple struct suggestionNoah Lev-2/+3
(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.
2021-02-04typeck: Emit structured suggestions for tuple struct syntaxCamelid-1/+1
And tuple variant syntax, but that didn't fit in the subject :) Now the fact that these are suggestions is exposed both to the layout engine and to IDEs and rustfix for automatic application.
2019-06-19fix indentationCedric-1/+1
2019-06-19provide variant definition on tuple struct unknow field errorCedric-1/+4
2019-06-19adt hint pointing to adt spanCedric-4/+3
2019-06-17suggest tuple struct syntaxCedric-3/+4
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2019-03-16use the identifier span for missing struct fieldAndy Russell-1/+1
2018-12-25Remove licensesMark Rousskov-2/+2
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+18