Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upcode suggestions for unused-mut, while-true, deprecated-attribute, and unused-parens lints #44942
Conversation
rust-highfive
assigned
estebank
Sep 30, 2017
estebank
approved these changes
Sep 30, 2017
|
Small nitpicks, r=me once you deal with the first two. |
| "denote infinite loops with loop { ... }"); | ||
| let msg = "denote infinite loops with `loop { ... }`"; | ||
| let mut err = cx.struct_span_lint(WHILE_TRUE, | ||
| e.span, msg); |
This comment has been minimized.
This comment has been minimized.
| e.span, msg); | ||
| let condition_span = cx.tcx.sess.codemap().def_span(e.span); | ||
| err.span_suggestion_short(condition_span, "use `loop`", | ||
| "loop".to_owned()); |
This comment has been minimized.
This comment has been minimized.
estebank
Sep 30, 2017
Contributor
When all arguments don't fit, I like to keep one line per argument (indented to the first one in the same line as the method).
| let mut err = cx.struct_span_lint(UNUSED_PARENS, | ||
| value.span, | ||
| &span_msg); | ||
| // Remove exactly one pair of parentheses (rather than naïvely |
This comment has been minimized.
This comment has been minimized.
zackmdavis
force-pushed the
zackmdavis:lint_suggestions
branch
from
15f4aa1
to
289faf5
Sep 30, 2017
This comment has been minimized.
This comment has been minimized.
|
(force-pushed to address formatting review comments) |
zackmdavis
added some commits
Sep 30, 2017
zackmdavis
force-pushed the
zackmdavis:lint_suggestions
branch
from
289faf5
to
a399757
Sep 30, 2017
This comment has been minimized.
This comment has been minimized.
|
(updated again to fix compile-fail failures reported by Travis) |
This comment has been minimized.
This comment has been minimized.
|
@bors r+ Thanks @zachreizner, great work! |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Oct 1, 2017
This comment has been minimized.
This comment has been minimized.
I agree; @zachreizner is the best! I especially like the one where he fixed the shift-right docs; it must have taken a very careful eye to catch that! |
This comment has been minimized.
This comment has been minimized.
|
Not the first time I've been thanked in place of a a fellow Zach :-). I think my handle just comes up before the Zack Zach-s in the autocomplete. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Appveyor/Windows apparently doesn't like the |
zackmdavis
force-pushed the
zackmdavis:lint_suggestions
branch
from
a399757
to
fa8802a
Oct 1, 2017
This comment has been minimized.
This comment has been minimized.
|
I believe we're really trying to move away from
|
zackmdavis
referenced this pull request
Oct 2, 2017
Closed
UI test expectation path normalization not working on Windows in all cases? #44968
zackmdavis
force-pushed the
zackmdavis:lint_suggestions
branch
from
fa8802a
to
979671e
Oct 2, 2017
This comment has been minimized.
This comment has been minimized.
zackmdavis
force-pushed the
zackmdavis:lint_suggestions
branch
from
979671e
to
8a14022
Oct 2, 2017
This comment has been minimized.
This comment has been minimized.
|
correction, PR is 8a14022 |
This comment has been minimized.
This comment has been minimized.
|
@bors r+ rollup |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Oct 2, 2017
This comment has been minimized.
This comment has been minimized.
|
|
zackmdavis commentedSep 30, 2017
r? @estebank