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

Make clippy a git subtree instead of a git submodule #70655

Merged
merged 8,408 commits into from
May 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
8408 commits
Select commit Hold shift + click to select a range
f8308c8
Auto merge of #5438 - flip1995:rollup-pi762oy, r=flip1995
bors Apr 8, 2020
899a1b5
Move cognitive_complexity to nursery
dtolnay Apr 6, 2020
5f92fae
Downgrade implicit_hasher to pedantic
dtolnay Apr 3, 2020
c2e5534
Check fn header along with decl when suggesting to implement trait
rabisg0 Apr 8, 2020
7bfdee5
Auto merge of #5428 - dtolnay:cognitive, r=flip1995
bors Apr 8, 2020
940bbd6
Auto merge of #5437 - rabisg0:should-impl-trait, r=flip1995
bors Apr 8, 2020
c25f26d
Auto merge of #5411 - dtolnay:hasher, r=flip1995
bors Apr 8, 2020
d440935
Add lint when comparing floats in an array
briankabiro Jul 31, 2019
0d00eaf
Add tests for float in array comparison
briankabiro Sep 19, 2019
03f584c
Update field names in is_float
marcin-serwin Mar 17, 2020
b4ff774
Update stderr of float_cmp test
marcin-serwin Mar 17, 2020
2153abb
Add handling of float arrays to miri_to_const
marcin-serwin Mar 19, 2020
6217671
Handle evaluating constant index expression
marcin-serwin Mar 19, 2020
bcbb9d9
Allow for const arrays of zeros
marcin-serwin Mar 20, 2020
1bab67c
Don't show comparison suggestion for arrays
marcin-serwin Mar 20, 2020
d3167c6
Handle constant arrays with single value
marcin-serwin Mar 20, 2020
3c738b2
Add float cmp tests for arrays
marcin-serwin Mar 20, 2020
c7b5e30
Add float cmp const tests for arrays
marcin-serwin Mar 20, 2020
84ae3d8
Make epsilon note spanless when comparing arrays
marcin-serwin Apr 6, 2020
f637c45
Indicate when arrays are compared in error message
marcin-serwin Apr 6, 2020
4e01ca3
Split check_fn function
marcin-serwin Apr 6, 2020
4449cc7
Make the epsilon note spanless
marcin-serwin Apr 6, 2020
380f721
Add lint on large const arrays
ThibsG Feb 29, 2020
629cc4a
Update doc generation script
ThibsG Mar 23, 2020
183c4ab
Check for clone-on-copy in argument positions
rabisg0 Apr 9, 2020
90fb50f
Revert "Downgrade new_ret_no_self to pedantic"
flip1995 Apr 9, 2020
34763a5
Auto merge of #5442 - rust-lang:revert-5420-newret, r=Manishearth
bors Apr 9, 2020
89f6012
compare with the second largest instead of the smallest variant
Apr 8, 2020
3ef1dab
Rustup to https://github.com/rust-lang/rust/pull/70913
phansch Apr 10, 2020
ed72dc4
Update documentation for new_ret_no_self
Emerentius Apr 10, 2020
ba7076f
Auto merge of #5447 - phansch:rustuppp, r=matthiaskrgr
bors Apr 10, 2020
0353f21
Auto merge of #5446 - rust-lang:gimme-a-second, r=flip1995
bors Apr 10, 2020
5e8c0c5
Auto merge of #5441 - rabisg0:fix/clone-on-copy, r=phansch
bors Apr 10, 2020
f7bdead
rustup https://github.com/rust-lang/rust/pull/69745
matthiaskrgr Apr 10, 2020
4352c85
rustup https://github.com/rust-lang/rust/pull/70986
matthiaskrgr Apr 11, 2020
97aa8dc
Auto merge of #5450 - matthiaskrgr:rustup_41, r=phansch
bors Apr 11, 2020
a296058
Allow UUID style formatting for `inconsistent_digit_grouping` lint
xyzd Apr 12, 2020
af5940b
Auto merge of #5451 - xyzd:allow-uuid-format-digit-grouping, r=phansch
bors Apr 12, 2020
c4e3ae4
verbose_bit_mask: fix bit mask used in docs
spl Apr 12, 2020
1d1b6d8
Say that diagnostic items are preferred over paths
phansch Apr 10, 2020
79982a2
Make use of some existing diagnostic items
phansch Apr 10, 2020
e29d550
Auto merge of #5454 - spl:patch-1, r=phansch
bors Apr 12, 2020
83874d0
Make use of Option/Result diagnostic items
phansch Apr 12, 2020
a524be6
cargo dev fmt
phansch Apr 12, 2020
e98c7a4
update lints
Emerentius Apr 12, 2020
23df4a0
Disallow bit-shifting in `integer_arithmetic` lint
michaelsproul Apr 13, 2020
ab3946d
Fixes #5405: redundant clone false positive with arrays
rabisg0 Apr 12, 2020
31c5664
Cleanup: Use our `sym!` macro more
phansch Apr 13, 2020
e47db67
Cleanup: Use rustc's is_proc_macro_attr
phansch Apr 13, 2020
9a52d52
result_map_unit_fn: Fix incorrect UI tests
phansch Apr 13, 2020
8ad1d78
Temporarily disable rustfmt integration test
phansch Apr 13, 2020
a4deb5a
Explain panic on `E0463` in integration tests
phansch Apr 13, 2020
6d4cc56
Auto merge of #5461 - phansch:disable_rustfmt_integration_test, r=mat…
bors Apr 13, 2020
54344c7
Auto merge of #5448 - Emerentius:update_new_ret_no_self_docs, r=phansch
bors Apr 13, 2020
aa08c39
Auto merge of #5458 - phansch:is-proc-macro-attr, r=matthiaskrgr
bors Apr 14, 2020
74e9256
Auto merge of #5453 - rabisg0:fix/redundant_clone, r=phansch
bors Apr 14, 2020
c1f2da4
rustup https://github.com/rust-lang/rust/pull/70643
matthiaskrgr Apr 14, 2020
85e8b64
Auto merge of #5463 - matthiaskrgr:rustup_42, r=phansch
bors Apr 14, 2020
d236b30
Auto merge of #5457 - phansch:sym, r=matthiaskrgr
bors Apr 14, 2020
9eda46e
deps: bump compiletest-rs from 0.4 to 0.5
matthiaskrgr Apr 14, 2020
3c77188
Auto merge of #5460 - phansch:fix_incorrect_tests, r=matthiaskrgr
bors Apr 14, 2020
81b3e70
Auto merge of #5449 - phansch:diagnostic-items, r=matthiaskrgr
bors Apr 14, 2020
9ec95af
Refactor: Use rustc's `match_def_path`
phansch Apr 12, 2020
c6cc07a
Auto merge of #5452 - phansch:match_def_path_refactor, r=matthiaskrgr
bors Apr 15, 2020
a96f874
Auto merge of #5345 - Toxyxer:add-lint-for-float-in-array-comparison,…
bors Apr 15, 2020
c496f4e
Auto merge of #5464 - matthiaskrgr:dep_compiletest, r=phansch
bors Apr 15, 2020
69c3e9c
large_enum_variant: Report sizes of variants
phansch Apr 15, 2020
d3ebd06
Make the single char threshold strict inequality
marcin-serwin Apr 15, 2020
512f23f
Add test for zero single char names
marcin-serwin Apr 15, 2020
b2d9868
Working basic dereference clip
tommilligan Oct 3, 2018
6b4ab82
Global rework + fix imports
ThibsG Jan 23, 2020
c113243
Report using stmts and expr + tests
ThibsG Jan 26, 2020
b6d4330
Check for Deref trait impl + add fixed version
ThibsG Feb 25, 2020
72b9ae2
Use only check_expr with parent expr and precedence
ThibsG Mar 7, 2020
3c2bbcf
Better precedence case management + more tests
ThibsG Mar 21, 2020
0441525
Merge remote-tracking branch 'upstream/master' into clippy-fix
yaahc Apr 15, 2020
ce372c1
Change default many single char names threshold
marcin-serwin Apr 15, 2020
216371d
split it up for testing but the merge broke tests
yaahc Apr 15, 2020
a3ce88b
add some tests
yaahc Apr 15, 2020
6250110
revert the damn fmt changes
yaahc Apr 15, 2020
7215495
rustup https://github.com/rust-lang/rust/pull/71116
matthiaskrgr Apr 15, 2020
a353f0f
Rename dummy_hir_id -> parent_hir_id
flip1995 Apr 15, 2020
a9a4c8e
Auto merge of #5467 - matthiaskrgr:rustup_43, r=flip1995
bors Apr 15, 2020
3481bf4
Rollup merge of #5226 - ThibsG:DerefExplicit1566, r=flip1995
flip1995 Apr 15, 2020
ceea3c6
Rollup merge of #5248 - ThibsG:ConstValues, r=flip1995
flip1995 Apr 15, 2020
2538e63
Rollup merge of #5430 - michaelsproul:integer-arithmetic, r=flip1995
flip1995 Apr 15, 2020
071a590
Rollup merge of #5466 - phansch:large-enum-variant-output, r=flip1995
flip1995 Apr 15, 2020
19183a6
Rollup merge of #5468 - Toxyxer:zero-single-char-names, r=flip1995
flip1995 Apr 15, 2020
6651c1b
Auto merge of #5470 - flip1995:rollup-cvkuiza, r=flip1995
bors Apr 15, 2020
b3030e1
rename field
yaahc Apr 15, 2020
0397e46
fmt
yaahc Apr 15, 2020
664ad33
manually fixing formatting at this point lol
yaahc Apr 15, 2020
5cfb9ec
Apply suggestions from code review
yaahc Apr 15, 2020
1765c5d
Auto merge of #5363 - yaahc:clippy-fix, r=phansch,flip1995
bors Apr 15, 2020
c20afbd
Lint map_flatten if caller is an Option
marcin-serwin Apr 15, 2020
72a8fc2
Add test to map_flatten with an Option
marcin-serwin Apr 15, 2020
014c415
Reenable rustfmt integration test
phansch Apr 16, 2020
b5d6233
[fix] Minor typo in GH Actions 'clippy_dev'
woshilapin Apr 16, 2020
7fb94c2
Do not lint in macros for match lints
ThibsG Mar 27, 2020
d181fde
CI: performing system upgrade fixes broken apt deps on ubuntu 32bit
matthiaskrgr Apr 16, 2020
da14f1e
Auto merge of #5478 - matthiaskrgr:apt_ci_debug_5477, r=phansch,flip1995
bors Apr 16, 2020
3704954
Auto merge of #5474 - phansch:reenable-rustfmt, r=flip1995
bors Apr 16, 2020
c1c8bc6
Auto merge of #5473 - Toxyxer:map-flatten-for-option, r=flip1995
bors Apr 16, 2020
65bc234
readme: update to cargo clippy --fix command
matthiaskrgr Apr 16, 2020
2f6b6ab
Auto merge of #5475 - woshilapin:woshilapin-patch-1, r=flip1995
bors Apr 16, 2020
adf7c50
Auto merge of #5476 - ThibsG:FixMatchesInExternalMacros, r=flip1995
bors Apr 16, 2020
eb9c15a
Auto merge of #5479 - matthiaskrgr:readme_auto_fix, r=flip1995
bors Apr 16, 2020
162cf26
unit_arg suggestion may be incorrect
sinkuu Apr 17, 2020
8ae143f
Auto merge of #5480 - sinkuu:unit_arg_app, r=flip1995
bors Apr 17, 2020
f58bb5b
question_mark: don't add `as_ref()` for a call expression
sinkuu Apr 17, 2020
870ae36
Cleanup: Rename 'db' variable to 'diag'
phansch Apr 17, 2020
eb7ad1c
cargo dev fmt
phansch Apr 17, 2020
82be9dc
Auto merge of #5481 - sinkuu:no_as_ref, r=phansch
bors Apr 17, 2020
3ea8e5e
Auto merge of #5482 - phansch:diag, r=matthiaskrgr
bors Apr 17, 2020
9c89cf0
Fix issue #4892.
Apr 10, 2020
66b855c
Integrate more idiomatic rust changes.
Apr 17, 2020
d2cbbff
add lint futures_not_send
rkuhn Apr 7, 2020
52dacbc
Auto merge of #5445 - logan-dev-oss:master, r=flip1995
bors Apr 17, 2020
f1fb815
Auto merge of #5423 - rkuhn:add_futures_not_send, r=flip1995
bors Apr 17, 2020
092c459
fix redundant_pattern_matching lint
alex-700 Apr 17, 2020
1c0e4e5
Auto merge of #5483 - alex-700:fix-redundant-pattern-matching, r=flip…
bors Apr 17, 2020
7c52e51
Added basic lint and tests
pmk21 Apr 6, 2020
4d03b4d
Added final lint and tests
pmk21 Apr 6, 2020
1c11035
Polished lint and tests
pmk21 Apr 17, 2020
891e1a8
Auto merge of #5427 - pmk21:implicit-sat-sub, r=flip1995
bors Apr 18, 2020
bdd32e7
Implement collapsible_span_lint_calls lint.
xiongmao86 Apr 17, 2020
d03d3bd
Fixes internal lint warning in code base.
xiongmao86 Apr 17, 2020
cf4e353
Add an Option<Span> argument to span_lint_and_help.
xiongmao86 Apr 18, 2020
d7f1a1e
Change note_span argument for span_lint_and_note.
xiongmao86 Apr 18, 2020
86c6207
Remove badge FIXME from Cargo.toml
flip1995 Apr 18, 2020
f6b07db
Auto merge of #5486 - flip1995:badge_over, r=flip1995
bors Apr 18, 2020
502a66d
Cleanup: future_not_send: use `return_ty` method
phansch Apr 19, 2020
554f47b
Don't trigger toplevel_ref_arg for `for` loops
sinkuu Apr 19, 2020
0ef5dee
Fix issue #2907.
smklein Apr 19, 2020
c3c00e5
Cleanup: `node_id` -> `hir_id`
phansch Apr 19, 2020
9273eab
Auto merge of #5490 - sinkuu:toplevel_ref_arg_for, r=phansch
bors Apr 19, 2020
6ed2ae8
Auto merge of #5488 - phansch:future-not-send-ret-ty, r=flip1995
bors Apr 19, 2020
e5fe56d
Auto merge of #5489 - phansch:node-id-hir-id, r=flip1995
bors Apr 19, 2020
41115d9
Formatting and naming
flip1995 Apr 19, 2020
98a244f
Formatting and naming
flip1995 Apr 19, 2020
2efc2d6
Auto merge of #5491 - smklein:borrowed_box, r=flip1995
bors Apr 19, 2020
7aeb3a4
Update empty_enum.stderr
flip1995 Apr 19, 2020
6dcc8d5
Auto merge of #5141 - xiongmao86:issue5095, r=flip1995
bors Apr 19, 2020
00b4f28
Implement unsafe_derive_deserialize lint
ebroto Apr 19, 2020
001a42e
progress work on suggestion for auto fix
DevinR528 Mar 5, 2020
139e2c6
creating suggestion
DevinR528 Mar 5, 2020
40bbdff
use span_lint_and_help, cargo dev fmt
DevinR528 Mar 18, 2020
51c2325
move closures to seperate fns, remove known problems
DevinR528 Mar 18, 2020
fca3537
add note about update-all-refs script, revert redundant pat to master
DevinR528 Mar 18, 2020
c6c77d9
use Visitor api to find Mutex::lock calls
DevinR528 Mar 18, 2020
930619b
change visitor name to OppVisitor
DevinR528 Mar 18, 2020
1ee04e4
fix internal clippy warnings
DevinR528 Mar 18, 2020
2e8a2de
dev update_lints
DevinR528 Mar 24, 2020
7242fa5
fix map import to rustc_middle
DevinR528 Mar 30, 2020
4cebe2b
cargo dev fmt
DevinR528 Mar 30, 2020
ae82092
use if chain
DevinR528 Apr 15, 2020
a9f1bb4
test for mutex eq, add another test case
DevinR528 Apr 15, 2020
d1b1a4c
update span_lint_and_help call to six args
DevinR528 Apr 20, 2020
b7f85e8
Apply suggestions from PR review
ebroto Apr 20, 2020
1336558
Auto merge of #5493 - ebroto:unsafe_derive_deserialize, r=flip1995
bors Apr 20, 2020
2141db8
Update the changelog update documentation
phansch Apr 20, 2020
489dd2e
factor ifs into function, add differing mutex test
DevinR528 Apr 20, 2020
90d8b63
util/fetch_prs_between.sh: Add Markdown formatted Link
phansch Apr 20, 2020
3fbe321
update stderr file
DevinR528 Apr 20, 2020
6ce05bf
Auto merge of #5332 - DevinR528:if-let-else-mutex, r=flip1995
bors Apr 20, 2020
4e63faa
Update CHANGELOG.md for Rust 1.43 and 1.44
phansch Apr 20, 2020
ca59ff2
remark fixes
phansch Apr 20, 2020
ef6ba82
Auto merge of #5495 - phansch:update_changelog_docs, r=flip1995
bors Apr 20, 2020
803670e
Address review comments
phansch Apr 20, 2020
6507728
Auto merge of #5496 - phansch:markdown-link, r=flip1995
bors Apr 20, 2020
7221db2
fix crash on issue-69020-assoc-const-arith-overflow.rs
matthiaskrgr Apr 20, 2020
b3cb9b8
Auto merge of #5499 - matthiaskrgr:crash_5497, r=flip1995
bors Apr 20, 2020
30c28a7
Also mention `--fix` for nightly users
phansch Apr 21, 2020
6c25c3c
Lint for holding locks across await points
rokob Apr 8, 2020
2dc8c08
Switch to matching against full paths instead of just the last elemen…
rokob Apr 10, 2020
54e7f7e
don't test the code in the lint docs
rokob Apr 10, 2020
d6e55e9
Make lint also capture blocks and closures, adjust language to mentio…
rokob Apr 17, 2020
8b052d3
span_lint_and_note now takes an Option<Span> for the note_span instea…
rokob Apr 22, 2020
1d4dd3d
Auto merge of #5439 - rokob:lock-await, r=Manishearth
bors Apr 22, 2020
14f596c
Only run cargo lints, when they are warn/deny/forbid
flip1995 Apr 21, 2020
f31502f
Only run (late) internal lints, when they are warn/deny/forbid
flip1995 Apr 22, 2020
9ef9b79
Rustup "Remove `BodyAndCache`"
tesuji Apr 23, 2020
3f6f392
`predecessors_for` will be removed soon
tesuji Apr 23, 2020
d01a498
Auto merge of #5508 - lzutao:rustup-71044, r=phansch
bors Apr 23, 2020
d021d3e
clippy_dev: make it fatal when the regex for updating lint count does…
matthiaskrgr Apr 23, 2020
0816412
README: fix lit count line
matthiaskrgr Apr 23, 2020
a609a9e
Auto merge of #5498 - phansch:update_changelog, r=flip1995
bors Apr 23, 2020
35ef280
Always use the deploy script and templates of the master branch
flip1995 Apr 23, 2020
0476e8b
Remove apt-get upgrade again
flip1995 Apr 23, 2020
02c9435
Auto merge of #5513 - matthiaskrgr:reg, r=phansch
bors Apr 23, 2020
4619bb2
Add a note to the beta sections of release.md
flip1995 Apr 23, 2020
c19ca0e
The beta branch update should not require a force push
flip1995 Apr 23, 2020
451bade
Run fetch before testing if master contains beta
flip1995 Apr 23, 2020
ef28361
Downgrade match_bool to pedantic
dtolnay Apr 3, 2020
f9c1acb
rustup https://github.com/rust-lang/rust/pull/71215/
matthiaskrgr Apr 24, 2020
96e2bc8
Added lint `match_vec_item`
CrazyRoka Apr 23, 2020
b0115fb
Removed unnecessary code, added support for vector references
CrazyRoka Apr 24, 2020
63b451e
Renamed lint to `match_on_vec_items`
CrazyRoka Apr 25, 2020
bf73d51
Add lifetime test case for `new_ret_no_self`
phansch Apr 25, 2020
fe25dbe
Fix while_let_on_iterator suggestion and make it MachineApplicable
flip1995 Apr 25, 2020
44511d5
Update while_let_on_iterator tests
flip1995 Apr 25, 2020
dda1c8d
Update issue_2356.stderr reference file
flip1995 Apr 25, 2020
6ffe725
Auto merge of #5520 - matthiaskrgr:rustup_44, r=flip1995,phansch
bors Apr 25, 2020
eadd9d2
Don't trigger while_let_on_iterator when the iterator is recreated ev…
flip1995 Apr 25, 2020
a182622
Add tests for #1654
flip1995 Apr 25, 2020
e1d13c3
Rollup merge of #5408 - dtolnay:matchbool, r=flip1995
flip1995 Apr 25, 2020
a33d64a
Rollup merge of #5505 - flip1995:avoid_running_lints, r=matthiaskrgr
flip1995 Apr 25, 2020
e39550e
Rollup merge of #5516 - flip1995:doc_release, r=phansch
flip1995 Apr 25, 2020
abbc618
Rollup merge of #5517 - flip1995:deploy_time_travel, r=Manishearth
flip1995 Apr 25, 2020
9b882ba
Rollup merge of #5523 - phansch:add-new-ret-no-self-testcase, r=flip1995
flip1995 Apr 25, 2020
77c23b7
Auto merge of #5527 - flip1995:rollup-pr2htfd, r=flip1995
bors Apr 25, 2020
69fe6b4
fix redundant_pattern_matching lint
alex-700 Apr 23, 2020
806d973
map_clone: avoid suggesting `copied()` for &mut
ebroto Apr 25, 2020
a76bfd4
Auto merge of #5530 - ebroto:issue_5524, r=flip1995
bors Apr 25, 2020
44eb953
Auto merge of #5525 - flip1995:issue_1654, r=phansch
bors Apr 25, 2020
07dd5fa
Auto merge of #5511 - alex-700:fix-redundant-pattern-matching, r=flip…
bors Apr 25, 2020
5b1622b
rustup to https://github.com/rust-lang/rust/pull/70043
phansch Apr 26, 2020
b7c802b
Auto merge of #5533 - phansch:rustup001, r=matthiaskrgr
bors Apr 26, 2020
0480ff8
More diagnostic items
phansch Apr 23, 2020
0a49935
cargo dev fmt
phansch Apr 23, 2020
8d596ea
Remove util/dev script
phansch Apr 26, 2020
eda73fe
Fix cargo crash
phansch Apr 26, 2020
5c12f2b
Auto merge of #5509 - phansch:more-diagnostic-items2, r=matthiaskrgr
bors Apr 26, 2020
87a6f3f
Auto merge of #5534 - phansch:remove-util-dev, r=flip1995
bors Apr 26, 2020
940c662
Small lint update
CrazyRoka Apr 26, 2020
b574941
Updated lint info in lib.rs
CrazyRoka Apr 26, 2020
149f6d6
Implement mismatched_target_os lint
ebroto Apr 22, 2020
d24a106
Apply suggestions from PR review
ebroto Apr 25, 2020
ce50e42
Use the span of the attribute for the error message
ebroto Apr 25, 2020
4a405c9
Remove some OSes from the test to comply with stderr line limit
ebroto Apr 25, 2020
303e7d1
Split tests in unix/non-unix
ebroto Apr 26, 2020
5d8a3e8
Auto merge of #5506 - ebroto:mismatched_target_os, r=flip1995
bors Apr 27, 2020
d13ffbe
Auto merge of #5522 - CrazyRoka:match_vec_item, r=phansch
bors Apr 27, 2020
305177d
rustup: rust-lang/rust#71628
csmoe Apr 27, 2020
f2486b3
Auto merge of #5538 - csmoe:rustup, r=phansch
bors Apr 27, 2020
3a96f54
used_underscore_binding: do not lint on `await` desugaring
ebroto Apr 26, 2020
fc5fc63
Test that we lint the awaited expression
ebroto Apr 27, 2020
2c4d566
Auto merge of #5535 - ebroto:issue_5360, r=phansch
bors Apr 28, 2020
bdc9528
rustup https://github.com/rust-lang/rust/pull/71292/
matthiaskrgr Apr 28, 2020
9a3b0a0
Auto merge of #5543 - matthiaskrgr:rustup_45, r=flip1995
bors Apr 28, 2020
cd34809
Rustup to rust-lang/rust#71518
flip1995 Apr 29, 2020
28197b6
Auto merge of #5545 - flip1995:rustup, r=flip1995
bors Apr 29, 2020
20c069b
Fixed incorrect suggestion of `clone_double_ref` lint
CrazyRoka Apr 29, 2020
0a53ed2
Auto merge of #5547 - CrazyRoka:fix-clone-double-ref-suggestion, r=fl…
bors Apr 29, 2020
b7800e1
mismatched_target_os: link to respective section in rust reference
matthiaskrgr Apr 30, 2020
d270887
Auto merge of #5548 - matthiaskrgr:traget_os, r=flip1995
bors May 1, 2020
a182450
Gate on clippy on CI
oli-obk Apr 1, 2020
1ef5a93
Also build clippy with `./x.py check`
oli-obk Apr 1, 2020
06c4481
Delete the clippy submodule
oli-obk Apr 1, 2020
bce9fae
Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24…
oli-obk May 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
[submodule "src/tools/rls"]
path = src/tools/rls
url = https://github.com/rust-lang/rls.git
[submodule "src/tools/clippy"]
path = src/tools/clippy
url = https://github.com/rust-lang/rust-clippy.git
[submodule "src/tools/rustfmt"]
path = src/tools/rustfmt
url = https://github.com/rust-lang/rustfmt.git
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl<'a> Builder<'a> {
native::Lld
),
Kind::Check | Kind::Clippy | Kind::Fix | Kind::Format => {
describe!(check::Std, check::Rustc, check::Rustdoc)
describe!(check::Std, check::Rustc, check::Rustdoc, check::Clippy)
}
Kind::Test => describe!(
crate::toolstate::ToolStateCheck,
Expand Down
142 changes: 74 additions & 68 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,83 +112,89 @@ impl Step for Rustc {
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Rustdoc {
pub target: Interned<String>,
macro_rules! tool_check_step {
($name:ident, $path:expr) => {
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct $name {
pub target: Interned<String>,
}

impl Step for $name {
type Output = ();
const ONLY_HOSTS: bool = true;
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path($path)
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure($name { target: run.target });
}

fn run(self, builder: &Builder<'_>) {
let compiler = builder.compiler(0, builder.config.build);
let target = self.target;

builder.ensure(Rustc { target });

let cargo = prepare_tool_cargo(
builder,
compiler,
Mode::ToolRustc,
target,
cargo_subcommand(builder.kind),
$path,
SourceType::InTree,
&[],
);

println!(
"Checking {} artifacts ({} -> {})",
stringify!($name).to_lowercase(),
&compiler.host,
target
);
run_cargo(
builder,
cargo,
args(builder.kind),
&stamp(builder, compiler, target),
vec![],
true,
);

let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
add_to_sysroot(&builder, &libdir, &hostdir, &stamp(builder, compiler, target));

/// Cargo's output path in a given stage, compiled by a particular
/// compiler for the specified target.
fn stamp(
builder: &Builder<'_>,
compiler: Compiler,
target: Interned<String>,
) -> PathBuf {
builder
.cargo_out(compiler, Mode::ToolRustc, target)
.join(format!(".{}-check.stamp", stringify!($name).to_lowercase()))
}
}
}
};
}

impl Step for Rustdoc {
type Output = ();
const ONLY_HOSTS: bool = true;
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.path("src/tools/rustdoc")
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Rustdoc { target: run.target });
}

fn run(self, builder: &Builder<'_>) {
let compiler = builder.compiler(0, builder.config.build);
let target = self.target;

builder.ensure(Rustc { target });

let cargo = prepare_tool_cargo(
builder,
compiler,
Mode::ToolRustc,
target,
cargo_subcommand(builder.kind),
"src/tools/rustdoc",
SourceType::InTree,
&[],
);

println!("Checking rustdoc artifacts ({} -> {})", &compiler.host, target);
run_cargo(
builder,
cargo,
args(builder.kind),
&rustdoc_stamp(builder, compiler, target),
vec![],
true,
);

let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
add_to_sysroot(&builder, &libdir, &hostdir, &rustdoc_stamp(builder, compiler, target));
}
}
tool_check_step!(Rustdoc, "src/tools/rustdoc");
tool_check_step!(Clippy, "src/tools/clippy");

/// Cargo's output path for the standard library in a given stage, compiled
/// by a particular compiler for the specified target.
pub fn libstd_stamp(
builder: &Builder<'_>,
compiler: Compiler,
target: Interned<String>,
) -> PathBuf {
fn libstd_stamp(builder: &Builder<'_>, compiler: Compiler, target: Interned<String>) -> PathBuf {
builder.cargo_out(compiler, Mode::Std, target).join(".libstd-check.stamp")
}

/// Cargo's output path for librustc in a given stage, compiled by a particular
/// compiler for the specified target.
pub fn librustc_stamp(
builder: &Builder<'_>,
compiler: Compiler,
target: Interned<String>,
) -> PathBuf {
fn librustc_stamp(builder: &Builder<'_>, compiler: Compiler, target: Interned<String>) -> PathBuf {
builder.cargo_out(compiler, Mode::Rustc, target).join(".librustc-check.stamp")
}

/// Cargo's output path for rustdoc in a given stage, compiled by a particular
/// compiler for the specified target.
pub fn rustdoc_stamp(
builder: &Builder<'_>,
compiler: Compiler,
target: Interned<String>,
) -> PathBuf {
builder.cargo_out(compiler, Mode::ToolRustc, target).join(".rustdoc-check.stamp")
}
77 changes: 28 additions & 49 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ pub struct Clippy {
}

impl Step for Clippy {
type Output = Option<PathBuf>;
type Output = PathBuf;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
Expand All @@ -1348,7 +1348,7 @@ impl Step for Clippy {
});
}

fn run(self, builder: &Builder<'_>) -> Option<PathBuf> {
fn run(self, builder: &Builder<'_>) -> PathBuf {
let compiler = self.compiler;
let target = self.target;
assert!(builder.config.extended);
Expand All @@ -1368,16 +1368,10 @@ impl Step for Clippy {
// state for clippy isn't testing.
let clippy = builder
.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() })
.or_else(|| {
missing_tool("clippy", builder.build.config.missing_tools);
None
})?;
.expect("clippy expected to build - essential tool");
let cargoclippy = builder
.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() })
.or_else(|| {
missing_tool("cargo clippy", builder.build.config.missing_tools);
None
})?;
.expect("clippy expected to build - essential tool");

builder.install(&clippy, &image.join("bin"), 0o755);
builder.install(&cargoclippy, &image.join("bin"), 0o755);
Expand Down Expand Up @@ -1416,7 +1410,7 @@ impl Step for Clippy {
builder.info(&format!("Dist clippy stage{} ({})", compiler.stage, target));
let _time = timeit(builder);
builder.run(&mut cmd);
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
}
}

Expand Down Expand Up @@ -1683,7 +1677,7 @@ impl Step for Extended {
tarballs.push(rustc_installer);
tarballs.push(cargo_installer);
tarballs.extend(rls_installer.clone());
tarballs.extend(clippy_installer.clone());
tarballs.push(clippy_installer);
tarballs.extend(miri_installer.clone());
tarballs.extend(rustfmt_installer.clone());
tarballs.extend(llvm_tools_installer);
Expand Down Expand Up @@ -1761,9 +1755,6 @@ impl Step for Extended {
if rls_installer.is_none() {
contents = filter(&contents, "rls");
}
if clippy_installer.is_none() {
contents = filter(&contents, "clippy");
}
if miri_installer.is_none() {
contents = filter(&contents, "miri");
}
Expand Down Expand Up @@ -1805,13 +1796,11 @@ impl Step for Extended {
prepare("rust-docs");
prepare("rust-std");
prepare("rust-analysis");
prepare("clippy");

if rls_installer.is_some() {
prepare("rls");
}
if clippy_installer.is_some() {
prepare("clippy");
}
if miri_installer.is_some() {
prepare("miri");
}
Expand Down Expand Up @@ -1863,12 +1852,10 @@ impl Step for Extended {
prepare("rust-analysis");
prepare("rust-docs");
prepare("rust-std");
prepare("clippy");
if rls_installer.is_some() {
prepare("rls");
}
if clippy_installer.is_some() {
prepare("clippy");
}
if miri_installer.is_some() {
prepare("miri");
}
Expand Down Expand Up @@ -1989,25 +1976,23 @@ impl Step for Extended {
.arg(etc.join("msi/remove-duplicates.xsl")),
);
}
if clippy_installer.is_some() {
builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("clippy")
.args(&heat_flags)
.arg("-cg")
.arg("ClippyGroup")
.arg("-dr")
.arg("Clippy")
.arg("-var")
.arg("var.ClippyDir")
.arg("-out")
.arg(exe.join("ClippyGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);
}
builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("clippy")
.args(&heat_flags)
.arg("-cg")
.arg("ClippyGroup")
.arg("-dr")
.arg("Clippy")
.arg("-var")
.arg("var.ClippyDir")
.arg("-out")
.arg(exe.join("ClippyGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);
if miri_installer.is_some() {
builder.run(
Command::new(&heat)
Expand Down Expand Up @@ -2073,6 +2058,7 @@ impl Step for Extended {
.arg("-dCargoDir=cargo")
.arg("-dStdDir=rust-std")
.arg("-dAnalysisDir=rust-analysis")
.arg("-dClippyDir=clippy")
.arg("-arch")
.arg(&arch)
.arg("-out")
Expand All @@ -2083,9 +2069,6 @@ impl Step for Extended {
if rls_installer.is_some() {
cmd.arg("-dRlsDir=rls");
}
if clippy_installer.is_some() {
cmd.arg("-dClippyDir=clippy");
}
if miri_installer.is_some() {
cmd.arg("-dMiriDir=miri");
}
Expand All @@ -2101,12 +2084,10 @@ impl Step for Extended {
candle("DocsGroup.wxs".as_ref());
candle("CargoGroup.wxs".as_ref());
candle("StdGroup.wxs".as_ref());
candle("ClippyGroup.wxs".as_ref());
if rls_installer.is_some() {
candle("RlsGroup.wxs".as_ref());
}
if clippy_installer.is_some() {
candle("ClippyGroup.wxs".as_ref());
}
if miri_installer.is_some() {
candle("MiriGroup.wxs".as_ref());
}
Expand Down Expand Up @@ -2138,14 +2119,12 @@ impl Step for Extended {
.arg("CargoGroup.wixobj")
.arg("StdGroup.wixobj")
.arg("AnalysisGroup.wixobj")
.arg("ClippyGroup.wixobj")
.current_dir(&exe);

if rls_installer.is_some() {
cmd.arg("RlsGroup.wixobj");
}
if clippy_installer.is_some() {
cmd.arg("ClippyGroup.wixobj");
}
if miri_installer.is_some() {
cmd.arg("MiriGroup.wixobj");
}
Expand Down
6 changes: 2 additions & 4 deletions src/bootstrap/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,8 @@ install!((self, builder, _config),
}
};
Clippy, "clippy", Self::should_build(_config), only_hosts: true, {
if builder.ensure(dist::Clippy {
compiler: self.compiler,
target: self.target,
}).is_some() || Self::should_install(builder) {
builder.ensure(dist::Clippy { compiler: self.compiler, target: self.target });
if Self::should_install(builder) {
install_clippy(builder, self.compiler.stage, self.target);
} else {
builder.info(
Expand Down
4 changes: 1 addition & 3 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,7 @@ impl Step for Clippy {

builder.add_rustc_lib_path(compiler, &mut cargo);

if try_run(builder, &mut cargo.into()) {
builder.save_toolstate("clippy-driver", ToolState::TestPass);
}
Comment on lines -551 to -553
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This porbably caused rust-highfive to think that clippy is test-fail now.

try_run(builder, &mut cargo.into());
} else {
eprintln!("failed to test clippy: could not build");
}
Expand Down
Loading