Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Clippy #87579

Merged
merged 57 commits into from
Jul 29, 2021
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e8f57c3
No longer suggest inserting or appending an underscore
th1000s May 13, 2021
2ac2188
Use diagnostic items for `BinaryHeap`, `BTreeMap`, `BTreeSet`, `HashM…
xFrednet Jul 14, 2021
6030428
Use diagnostic items for `Into`, `IntoIterator`, `LinkedList`, `ptr::…
xFrednet Jul 14, 2021
6ce6b29
Use diagnostic items for `intrinsics::transmute`, `TryInto`
xFrednet Jul 14, 2021
ecf85f4
Use diagnostic items for `Vec`, `VecDeque` and connected refactorings
xFrednet Jul 14, 2021
f882c36
fix(clippy): add missing allow(dyn_drop)
notriddle Jul 18, 2021
884ef4c
Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup
flip1995 Jul 19, 2021
6103814
Auto merge of #7221 - th1000s:keyword_, r=giraffate
bors Jul 19, 2021
24ec35a
Enhance needless continue to detect loop {continue;}
F3real Jul 20, 2021
9d6127c
Emit needless_continue warning if loop ends on continue
F3real Jul 21, 2021
c3452f3
Lint on continue expression without semi-colon
F3real Jul 22, 2021
544c462
Documented constant expression evaluation for `repeat_once`
xFrednet Jul 23, 2021
045dbb5
Clean up unnecessary unwraps
F3real Jul 23, 2021
1b8fc8f
update clippy ui test 'future_not_send.stderr' to match
chazkiker2 Jul 23, 2021
ea97a5a
Add clippy_utils and if_chain to extern crate list
camsteffen Jul 23, 2021
afe5962
clippy::author improvements
camsteffen Jul 23, 2021
ea69a9d
Auto merge of #7482 - xFrednet:7306-document-repeat-once-fp, r=giraffate
bors Jul 24, 2021
00faed9
Add generic arg infer
JulianKnodt Apr 24, 2021
8286824
Add inferred args to typeck
JulianKnodt Apr 26, 2021
5b914f6
Introduce OwnerNode::Crate.
cjgillot Jul 25, 2021
1270ed0
Auto merge of #83723 - cjgillot:ownernode, r=petrochenkov
bors Jul 25, 2021
f68629a
Explain flags missing in cargo check in --help
nfejzic Jul 25, 2021
d3492a0
author: check block.expr: None
camsteffen Jul 25, 2021
89c8c3f
Prefer a code snipped over formatting the self type (`new_without_def…
xFrednet Jul 25, 2021
6d9036b
Auto merge of #7484 - camsteffen:author, r=flip1995
bors Jul 26, 2021
02d70f3
Auto merge of #7477 - F3real:needless_continue, r=flip1995
bors Jul 26, 2021
7d6946d
Auto merge of #7485 - camsteffen:add-test-externs, r=flip1995
bors Jul 26, 2021
3214de3
Auto merge of #7493 - xFrednet:7220-fix-new-without-default-impl-type…
bors Jul 26, 2021
0e5802e
Include more information in --help
nfejzic Jul 26, 2021
3c517b3
Improve conflicting rlibs error again
camsteffen Jul 26, 2021
fd2b43d
Auto merge of #7495 - camsteffen:extern-conflict, r=Manishearth
bors Jul 26, 2021
74379d4
Actually infer args in visitors
JulianKnodt May 6, 2021
ceb7a86
Auto merge of #7466 - xFrednet:5393-use-more-diagnostic-items, r=flip…
bors Jul 27, 2021
f7af8bf
Handle `--no-deps` flag same as `--fix` flag.
nfejzic Jul 27, 2021
a1bab3b
Add primitive type support to disallowed_type lint
DevinR528 Jul 22, 2021
43905d9
Auto merge of #7488 - DevinR528:bantype-fix, r=camsteffen
bors Jul 27, 2021
ac0fd99
Auto merge of #7492 - nfejzic:improve_help, r=Manishearth
bors Jul 27, 2021
ea988af
Auto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnr
bors Jul 27, 2021
5331fea
Update tests
jhpratt Jun 3, 2021
6c5d199
Update deploy CI
flip1995 May 31, 2021
fe25282
Remove old python lint doc generation scripts
flip1995 Jul 28, 2021
12c6161
Update lint documentation to use markdown headlines
xFrednet Jul 2, 2021
9bc5803
Fix last occurence of **What it does:**
flip1995 Jul 28, 2021
322a768
Adapting the lint list to Clippy's new metadata format
xFrednet May 18, 2021
c951a3c
Run cargo collect-metadata in cargo dev serve
flip1995 Jul 28, 2021
ce46599
Rollup merge of #7279 - xFrednet:7172-adapt-website-to-new-format, r=…
flip1995 Jul 28, 2021
bcdf147
Rollup merge of #7298 - flip1995:ci-switch-to-monster, r=xFrednet,fli…
flip1995 Jul 28, 2021
464c85c
Rollup merge of #7420 - xFrednet:7172-update-lint-documentation, r=fl…
flip1995 Jul 28, 2021
92ca25b
Auto merge of #7502 - flip1995:rollup-y3ho3w0, r=flip1995
bors Jul 28, 2021
490beda
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jul 29, 2021
7ed7b29
Bump nightly version -> 2021-07-29
flip1995 Jul 29, 2021
80116f9
Bump Clippy Version -> 0.1.56
flip1995 Jul 29, 2021
766f09f
Auto merge of #7503 - flip1995:rustup, r=flip1995
bors Jul 29, 2021
54e5391
Rename two lints to comply with our lint naming convention
flip1995 Jul 29, 2021
0cce3f6
Auto merge of #7504 - flip1995:rename-lints, r=flip1995
bors Jul 29, 2021
72d655b
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
flip1995 Jul 29, 2021
8570a36
Update Cargo.lock (Clippy version bump)
flip1995 Jul 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up unnecessary unwraps
F3real committed Jul 23, 2021

Verified

This commit was signed with the committer’s verified signature.
awvwgk Sebastian Ehlert
commit 045dbb52d5bc3d97d30234c69a9c556f7d779732
9 changes: 4 additions & 5 deletions clippy_lints/src/needless_continue.rs
Original file line number Diff line number Diff line change
@@ -370,15 +370,14 @@ fn suggestion_snippet_for_continue_inside_else<'a>(cx: &EarlyContext<'_>, data:
fn check_and_warn<'a>(cx: &EarlyContext<'_>, expr: &'a ast::Expr) {
if_chain! {
if let ast::ExprKind::Loop(loop_block, ..) = &expr.kind;
if !loop_block.stmts.is_empty();
if let ast::StmtKind::Expr(ref statement)
| ast::StmtKind::Semi(ref statement) = loop_block.stmts.last().unwrap().kind;
if let ast::ExprKind::Continue(_) = statement.kind;
if let Some(last_stmt) = loop_block.stmts.last();
if let ast::StmtKind::Expr(inner_expr) | ast::StmtKind::Semi(inner_expr) = &last_stmt.kind;
if let ast::ExprKind::Continue(_) = inner_expr.kind;
then {
span_lint_and_help(
cx,
NEEDLESS_CONTINUE,
loop_block.stmts.last().unwrap().span,
last_stmt.span,
MSG_REDUNDANT_CONTINUE_EXPRESSION,
None,
DROP_CONTINUE_EXPRESSION_MSG,