16 Commits

Author SHA1 Message Date
Alex Tokarev
b35c30251f Reword unused variable warning 2020-03-23 12:14:45 +03:00
varkor
24a2929ed1 Normalise notes with the/is 2020-01-24 16:24:50 +00:00
Tomasz Miąsko
427952e808 Make error and warning annotations mandatory in UI tests
This change makes error and warning annotations mandatory in UI tests.
The only exception are tests that use error patterns to match compiler
output and don't have any annotations.
2019-11-10 21:01:02 +01:00
Mazdak Farrokhzad
370fbcc022 or-patterns: #47390: we rely on names to exercise IndexMap. 2019-09-16 20:49:48 +02:00
Samy Kacimi
e5e1397adb
normalize use of backticks in compiler messages for librustc/lint
https://github.com/rust-lang/rust/issues/60532
2019-07-17 22:49:48 +02:00
David Wood
5f021e0023
Unused variable suggestions on all patterns.
This commit extends existing suggestions to prefix unused variable
bindings in match arms with an underscore so that it applies to all
patterns in a match arm.
2019-01-28 10:46:31 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
John Ginger
c0e3f4b8bb Change to give a help message 2018-12-07 14:15:36 +00:00
John Ginger
70536d4b4c Fix stderr file (unused variable) 2018-12-03 22:53:03 +00:00
Zack M. Davis
59782f4829 in which the unused shorthand field pattern debacle/saga continues
In e4b1a79 (#47922), we corrected erroneous suggestions for unused
shorthand field pattern bindings, suggesting `field: _` where the
previous suggestion of `_field` wouldn't even have compiled
(#47390). Soon, it was revealed that this was insufficient (#50303), and
the fix was extended to references, slices, &c. (#50327) But even this
proved inadequate, as the erroneous suggestions were still being issued
for patterns in local (`let`) bindings (#50804). Here, we yank the
shorthand-detection and variable/node registration code into a new
common function that can be called while visiting both match arms and
`let` bindings.

Resolves #50804.
2018-05-18 01:00:22 -07:00
csmoe
6c682eb46a reduce variable span 2018-05-13 16:34:27 +08:00
varkor
2eb8343af1 Correct unused field warning on struct match container patterns 2018-04-30 01:27:37 +01:00
varkor
8e8fe9042c Correct unused field warning on box struct match 2018-04-30 00:51:02 +01:00
varkor
cc53db8bf9 Correct unused field warning on &struct match 2018-04-30 00:40:11 +01:00
Vadim Petrochenkov
fa2d9fc4b9 Update UI tests 2018-02-26 20:24:02 +03:00
Zack M. Davis
e4b1a7971d concerning well-formed suggestions for unused shorthand field patterns
Previously, unused variables would get a note that the warning could be
silenced by prefixing the variable with an underscore, but that doesn't
work for field shorthand patterns, which the liveness analysis didn't
know about.

The "to avoid this warning" verbiage seemed unnecessary.

Resolves #47390.
2018-01-31 21:27:16 -08:00