about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2020-05-02Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'Oliver Scherer-0/+114475
git-subtree-dir: src/tools/clippy git-subtree-mainline: 06c44816c1532e5ff08ad072f581fc068eb60e2e git-subtree-split: d2708873ef711ec8ab45df1e984ecf24a96cd369
2020-05-02Delete the clippy submoduleOliver Scherer-11/+0
2020-05-01submodules: update cargo from 90931d9b3 to 258c89644Matthias Krüger-0/+0
Changes: ```` Remove unnecessary loop in `maybe_spurious` Fix error with git repo discovery and symlinks. Allow failure when setting file mtime. Support multiple `--target` flags on the CLI build-std: Don't treat std like a "local" package. Allow `cargo package --list` even for things that don't package. ````
2020-04-30Auto merge of #71687 - RalfJung:miri, r=RalfJungbors-10/+7
update Miri Fixes https://github.com/rust-lang/rust/issues/71632 r? @ghost Cc @rust-lang/miri
2020-04-29update MiriRalf Jung-10/+7
2020-04-29Update Clippyflip1995-7/+7
2020-04-28Auto merge of #71642 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 11 commits in 8751eb3010d4cdb5329b5a6bd2b6d765c95b0dca..90931d9b31e8b854522fed00916504a3ac6d8619 2020-04-21 18:04:35 +0000 to 2020-04-28 01:56:59 +0000 - Use associated constants directly on primitive types instead of modules (rust-lang/cargo#8077) - Clear `RUSTDOCFLAGS` before running tests (rust-lang/cargo#8168) - Fix warning for `resolve` mismatch in workspace. (rust-lang/cargo#8169) - Fix flaky linking_interrupted test. (rust-lang/cargo#8162) - Fixed some unnecessary borrows and clones. (rust-lang/cargo#8146) - Added warning when using restricted names in Windows. (rust-lang/cargo#8136) - Add changelog about dylib uplift. (rust-lang/cargo#8161) - Mention that cargo_metadata can parse json messages (rust-lang/cargo#8158) - Re-enable rustc-info-cache test again (rust-lang/cargo#8155) - Updates to path source walking. (rust-lang/cargo#8095) - Bump to 0.46.0, update changelog (rust-lang/cargo#8153)
2020-04-28Rollup merge of #71456 - mzohreva:mz/sgx-no-dylib, r=nikomatsakisDylan DPC-0/+1
Use lib crate type for SGX in `fn build_auxiliary` since SGX does not support `dylib` cc @Goirad
2020-04-28Update cargoEric Huss-0/+0
2020-04-28Auto merge of #71606 - Xanewok:update-rls, r=Xanewokbors-0/+0
Update RLS to unbreak toolstate Breakage caused by https://github.com/rust-lang/rust/pull/71263. r? @ghost
2020-04-27Rollup merge of #71605 - GuillaumeGomez:remove-e0750-from-whitelist, r=Dylan-DPCDylan DPC-1/+1
No need to whitelist E0750 anymore Since #71304 has been fixed, no need to whitelist it anymore. r? @Dylan-DPC
2020-04-27Rollup merge of #71578 - ryzokuken:linkchecker, r=Dylan-DPCDylan DPC-1/+1
linkchecker: fix typo in main.rs Came across this while reading the file.
2020-04-27Update RLS to unbreak toolstateIgor Matuszewski-0/+0
Breakage caused by https://github.com/rust-lang/rust/pull/71263.
2020-04-27No need to whitelist E0750 anymoreGuillaume Gomez-1/+1
2020-04-26submodules: update clippy from 891e1a85 to b7c802b5Matthias Krüger-10/+8
Changes: ```` rustup to https://github.com/rust-lang/rust/pull/70043 map_clone: avoid suggesting `copied()` for &mut fix redundant_pattern_matching lint Add tests for #1654 Don't trigger while_let_on_iterator when the iterator is recreated every iteration Update issue_2356.stderr reference file Update while_let_on_iterator tests Fix while_let_on_iterator suggestion and make it MachineApplicable Add lifetime test case for `new_ret_no_self` rustup https://github.com/rust-lang/rust/pull/71215/ Downgrade match_bool to pedantic Run fetch before testing if master contains beta The beta branch update should not require a force push Add a note to the beta sections of release.md Remove apt-get upgrade again Always use the deploy script and templates of the master branch README: fix lit count line clippy_dev: make it fatal when the regex for updating lint count does not match `predecessors_for` will be removed soon Rustup "Remove `BodyAndCache`" Only run (late) internal lints, when they are warn/deny/forbid Only run cargo lints, when they are warn/deny/forbid span_lint_and_note now takes an Option<Span> for the note_span instead of just a span Make lint also capture blocks and closures, adjust language to mention other mutex types don't test the code in the lint docs Switch to matching against full paths instead of just the last element of the path Lint for holding locks across await points Also mention `--fix` for nightly users fix crash on issue-69020-assoc-const-arith-overflow.rs Address review comments remark fixes Update CHANGELOG.md for Rust 1.43 and 1.44 update stderr file util/fetch_prs_between.sh: Add Markdown formatted Link factor ifs into function, add differing mutex test Update the changelog update documentation Apply suggestions from PR review update span_lint_and_help call to six args test for mutex eq, add another test case use if chain cargo dev fmt fix map import to rustc_middle dev update_lints fix internal clippy warnings change visitor name to OppVisitor use Visitor api to find Mutex::lock calls add note about update-all-refs script, revert redundant pat to master move closures to seperate fns, remove known problems use span_lint_and_help, cargo dev fmt creating suggestion progress work on suggestion for auto fix Implement unsafe_derive_deserialize lint Update empty_enum.stderr Formatting and naming Formatting and naming Cleanup: `node_id` -> `hir_id` Fix issue #2907. Don't trigger toplevel_ref_arg for `for` loops Cleanup: future_not_send: use `return_ty` method Remove badge FIXME from Cargo.toml Change note_span argument for span_lint_and_note. Add an Option<Span> argument to span_lint_and_help. Fixes internal lint warning in code base. Implement collapsible_span_lint_calls lint. ```` Fixes #71453
2020-04-26linkchecker: fix typo in main.rsUjjwal Sharma-1/+1
2020-04-25Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievinkbors-1/+1
Bump bootstrap compiler This bumps the bootstrap compiler and the rustfmt that x.py fmt uses.
2020-04-25Bump bootstrap compilerMark Rousskov-1/+1
2020-04-24Rollup merge of #71428 - tromey:gdb-10-parsing, r=tromeyDylan DPC-5/+21
Let compiletest recognize gdb 10.x git gdb has moved to version 10. My build prints this as its --version: GNU gdb (GDB) 10.0.50.20200420-git Unfortunately this conflicts with this comment in compiletest: // We limit major to 1 digit, otherwise, on openSUSE, we parse the openSUSE version This patch changes the version parsing to follow the GNU coding standard, which accounts for both the openSUSE case as well as handling gdb 10. My debuginfo test run now says: NOTE: compiletest thinks it is using GDB with native rust support NOTE: compiletest thinks it is using GDB version 10000050 ... where previously it failed to find that gdb 10 had rust support.
2020-04-23Fix ui test blessing when a test has an empty stderr file after having had ↵Oliver Scherer-1/+5
content there before the current changes
2020-04-23Auto merge of #71343 - RalfJung:miri, r=RalfJungbors-7/+10
update Miri Fixes https://github.com/rust-lang/rust/issues/71241 r? @ghost Cc @rust-lang/miri
2020-04-22Use lib crate type for SGX in `fn build_auxiliary`Mohsen Zohrevandi-0/+1
2020-04-23update MiriRalf Jung-7/+10
2020-04-22Fix compiletest version-parsing testsTom Tromey-2/+2
The compiletest version-parsing tests failed after the previous patch. However, I don't believe these tests are correct, in that I don't think RHEL or CentOS ever put the gdb version number into parentheses. Instead they display like: GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
2020-04-22Let compiletest recognize gdb 10.xTom Tromey-3/+19
git gdb has moved to version 10. My build prints this as its --version: GNU gdb (GDB) 10.0.50.20200420-git Unfortunately this conflicts with this comment in compiletest: // We limit major to 1 digit, otherwise, on openSUSE, we parse the openSUSE version This patch changes the version parsing to follow the GNU coding standard, which accounts for both the openSUSE case as well as handling gdb 10. My debuginfo test run now says: NOTE: compiletest thinks it is using GDB with native rust support NOTE: compiletest thinks it is using GDB version 10000050 ... where previously it failed to find that gdb 10 had rust support.
2020-04-22Add checks to ensure that explanations have code examples using the error ↵Guillaume Gomez-15/+74
code and also that 'compile_fail' isn't mispelled
2020-04-21Update cargo, rlsEric Huss-0/+0
2020-04-18submodules: update clippy from 6651c1b9 to 891e1a85Matthias Krüger-20/+10
Changes: ```` Polished lint and tests Added final lint and tests Added basic lint and tests fix redundant_pattern_matching lint add lint futures_not_send Integrate more idiomatic rust changes. Fix issue #4892. cargo dev fmt Cleanup: Rename 'db' variable to 'diag' question_mark: don't add `as_ref()` for a call expression unit_arg suggestion may be incorrect readme: update to cargo clippy --fix command CI: performing system upgrade fixes broken apt deps on ubuntu 32bit Do not lint in macros for match lints [fix] Minor typo in GH Actions 'clippy_dev' Reenable rustfmt integration test Add test to map_flatten with an Option Lint map_flatten if caller is an Option Apply suggestions from code review manually fixing formatting at this point lol fmt rename field revert the damn fmt changes add some tests split it up for testing but the merge broke tests dogfood tasted bad fix rustfmt issue boycott manish check for unstable options Start work on clippy-fix as subcommand ````
2020-04-16Update cargoEric Huss-0/+0
2020-04-16Auto merge of #71173 - RalfJung:miri, r=RalfJungbors-10/+7
bump Miri Fixes https://github.com/rust-lang/rust/issues/71110 r? @ghost Cc @rust-lang/miri
2020-04-16Auto merge of #71159 - topecongiro:rustfmt-1.4.14, r=Dylan-DPCbors-14/+18
Bump rustfmt and rls Close #71076. Close #71077. r? @Xanewok
2020-04-16bump MiriRalf Jung-10/+7
2020-04-15Auto merge of #71180 - Dylan-DPC:rollup-pscpg6q, r=Dylan-DPCbors-418/+398
Rollup of 6 pull requests Successful merges: - #69903 (Do not ICE in the face of invalid enum discriminant) - #70354 (Update RELEASES.md for 1.43.0) - #70774 (End cleanup on rustdoc-js tools) - #70990 (Improve rustdoc source code a bit) - #71145 (Add illumos triple) - #71166 (Clean up E0518 explanation) Failed merges: r? @ghost
2020-04-16Rollup merge of #71145 - pfmooney:illumos-triple, r=nagisaDylan DPC-0/+2
Add illumos triple This fixes rust-lang/rust#55553 and adds support for `illumos` as a `target_os` on `x86_64`. In addition to the compile spec and libstd additions, several library dependencies have been bumped in order to permit working builds of cargo and rustup for the new target. Work originally started by @jasonbking, with subsequent additions by @pfmooney and @jclulow.
2020-04-16Rollup merge of #70774 - GuillaumeGomez:clean-rustdoc-js-tools, r=ollie27Dylan DPC-418/+396
End cleanup on rustdoc-js tools Fixes #70689. It removes a lot of code, which is pretty nice. :3 We now only have one entry point and a small set of options. r? @ollie27
2020-04-15Auto merge of #71139 - matthiaskrgr:submodule_upd, r=Dylan-DPCbors-13/+17
submodules: update clippy from af5940b7 to d236b30a Changes: ```` rustup https://github.com/rust-lang/rust/pull/70643 Explain panic on `E0463` in integration tests Temporarily disable rustfmt integration test Cleanup: Use rustc's is_proc_macro_attr Cleanup: Use our `sym!` macro more Fixes #5405: redundant clone false positive with arrays update lints verbose_bit_mask: fix bit mask used in docs Update documentation for new_ret_no_self ```` Fixes #71114
2020-04-15submodules: update clippy from af5940b7 to 6651c1b9Matthias Krüger-13/+17
Changes: ```` Rename dummy_hir_id -> parent_hir_id rustup https://github.com/rust-lang/rust/pull/71116 Change default many single char names threshold Better precedence case management + more tests Use only check_expr with parent expr and precedence Check for Deref trait impl + add fixed version Report using stmts and expr + tests Global rework + fix imports Working basic dereference clip Add test for zero single char names Make the single char threshold strict inequality large_enum_variant: Report sizes of variants Refactor: Use rustc's `match_def_path` deps: bump compiletest-rs from 0.4 to 0.5 rustup https://github.com/rust-lang/rust/pull/70643 Explain panic on `E0463` in integration tests Temporarily disable rustfmt integration test result_map_unit_fn: Fix incorrect UI tests Cleanup: Use rustc's is_proc_macro_attr Cleanup: Use our `sym!` macro more Fixes #5405: redundant clone false positive with arrays Disallow bit-shifting in `integer_arithmetic` lint update lints cargo dev fmt Make use of Option/Result diagnostic items Make use of some existing diagnostic items Say that diagnostic items are preferred over paths verbose_bit_mask: fix bit mask used in docs Update documentation for new_ret_no_self Update doc generation script Add lint on large const arrays Make the epsilon note spanless Split check_fn function Indicate when arrays are compared in error message Make epsilon note spanless when comparing arrays Add float cmp const tests for arrays Add float cmp tests for arrays Handle constant arrays with single value Don't show comparison suggestion for arrays Allow for const arrays of zeros Handle evaluating constant index expression Add handling of float arrays to miri_to_const Update stderr of float_cmp test Update field names in is_float Add tests for float in array comparison Add lint when comparing floats in an array ```` Fixes #71114
2020-04-15update tool maintainersPietro Albini-1/+1
2020-04-15Bump rustfmt and rlstopecongiro-14/+18
2020-04-14Add illumos triplePatrick Mooney-0/+2
Co-Authored-By: Jason King <jason.brian.king@gmail.com> Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
2020-04-14Update cargoEric Huss-0/+0
2020-04-14Improve rustdoc js testers codeGuillaume Gomez-43/+36
2020-04-13Auto merge of #70989 - eddyb:mir-opt-32-pr-ci, r=Mark-Simulacrumbors-8/+15
ci: run mir-opt tests on PR CI also as 32-bit (for `EMIT_MIR_FOR_EACH_BIT_WIDTH`). Background: #69916 and [`src/test/mir-opt/README.md`](https://github.com/rust-lang/rust/blob/master/src/test/mir-opt/README.md): > By default 32 bit and 64 bit targets use the same dump files, which can be problematic in the presence of pointers in constants or other bit width dependent things. In that case you can add > > ``` > // EMIT_MIR_FOR_EACH_BIT_WIDTH > ``` > > to your test, causing separate files to be generated for 32bit and 64bit systems. However, if you change the output of such a test (intentionally or not), or if you add a test and it varies between 32-bit and 64-bit platforms, you have to run this command (for a x64 linux host): `./x.py test --stage 1 --target x86_64-unknown-linux-gnu --target i686-unknown-linux-gnu --bless src/test/mir-opt` Otherwise, bors trying to merge the PR will fail, since we test 32-bit targets there. But we don't on PR CI, which means there's no way the PR author would know (unless they were burnt by this already and know what to look for). This PR resolves that by running `mir-opt` tests for ~~`i686-unknown-linux-gnu`~~, on PR CI. **EDIT**: switched to `armv5te-unknown-linux-gnueabi` to work around LLVM 7 crashes (see https://github.com/rust-lang/compiler-builtins/pull/311#issuecomment-612270089), found during testing. cc @rust-lang/wg-mir-opt @rust-lang/infra
2020-04-13Auto merge of #71056 - matthiaskrgr:submodule_upd, r=Dylan-DPCbors-26/+17
submodules: update clippy from d342cee7 to af5940b7 Changes: ```` Allow UUID style formatting for `inconsistent_digit_grouping` lint rustup https://github.com/rust-lang/rust/pull/70986 rustup https://github.com/rust-lang/rust/pull/69745 Rustup to https://github.com/rust-lang/rust/pull/70913 compare with the second largest instead of the smallest variant Revert "Downgrade new_ret_no_self to pedantic" Check for clone-on-copy in argument positions Check fn header along with decl when suggesting to implement trait Downgrade implicit_hasher to pedantic Move cognitive_complexity to nursery Run fmt and update test Use int assoc consts in MANUAL_SATURATING_ARITHMETIC Use int assoc consts in checked_conversions lint Use primitive type assoc consts in more tests Use integer assoc consts in more lint example code Don't import primitive type modules Use assoc const NAN for zero_div_zero lint Fix float cmp to use assoc fxx::EPSILON Fix NAN comparison lint to use assoc NAN Refine lint message. Lint on opt.as_ref().map(|x| &**x). Include OpAssign in suspicious_op_assign_impl result_map_or_into_option: fix syntax error in example result_map_or_into: fix dogfood_clippy error => {h,l}int CONTRIBUTING.md: fix broken triage link result_map_or_into_option: fix `cargo dev fmt --check` errors result_map_or_into_option: move arg checks into tuple assignment result_map_or_into_option: add `opt.map_or(None, |_| Some(y))` test result_map_or_into_option: destructure lint tuple or return early result_map_or_into_option: add good and bad examples result_map_or_into_option: explicitly note absence of known problems Downgrade new_ret_no_self to pedantic Downgrade unreadable_literal to pedantic Update CONTRIBUTING.md Rename rustc -> rustc_middle in doc links result_map_or_into_option: add lint to catch manually adpating Result -> Option Move matches test in matches module Run update_lints Make lint modules private Don't filter lints in code generation functions Build lint lists once and the reuse them to update files Get rid of Lint::is_internal method Clean up update_lints Downgrade inefficient_to_string to pedantic Downgrade trivially_copy_pass_by_ref to pedantic Downgrade let_unit_value to pedantic ```` Fixes #70993 r? @Dylan-DPC
2020-04-12Auto merge of #70873 - mark-i-m:update-rdg, r=JohnTitorbors-1/+3
Update rustc-dev-guide This should finally fix toolstate r? @JohnTitor
2020-04-12submodules: update clippy from d342cee7 to af5940b7Matthias Krüger-26/+17
Changes: ```` Allow UUID style formatting for `inconsistent_digit_grouping` lint rustup https://github.com/rust-lang/rust/pull/70986 rustup https://github.com/rust-lang/rust/pull/69745 Rustup to https://github.com/rust-lang/rust/pull/70913 compare with the second largest instead of the smallest variant Revert "Downgrade new_ret_no_self to pedantic" Check for clone-on-copy in argument positions Check fn header along with decl when suggesting to implement trait Downgrade implicit_hasher to pedantic Move cognitive_complexity to nursery Run fmt and update test Use int assoc consts in MANUAL_SATURATING_ARITHMETIC Use int assoc consts in checked_conversions lint Use primitive type assoc consts in more tests Use integer assoc consts in more lint example code Don't import primitive type modules Use assoc const NAN for zero_div_zero lint Fix float cmp to use assoc fxx::EPSILON Fix NAN comparison lint to use assoc NAN Refine lint message. Lint on opt.as_ref().map(|x| &**x). Include OpAssign in suspicious_op_assign_impl result_map_or_into_option: fix syntax error in example result_map_or_into: fix dogfood_clippy error => {h,l}int CONTRIBUTING.md: fix broken triage link result_map_or_into_option: fix `cargo dev fmt --check` errors result_map_or_into_option: move arg checks into tuple assignment result_map_or_into_option: add `opt.map_or(None, |_| Some(y))` test result_map_or_into_option: destructure lint tuple or return early result_map_or_into_option: add good and bad examples result_map_or_into_option: explicitly note absence of known problems Downgrade new_ret_no_self to pedantic Downgrade unreadable_literal to pedantic Update CONTRIBUTING.md Rename rustc -> rustc_middle in doc links result_map_or_into_option: add lint to catch manually adpating Result -> Option Move matches test in matches module Run update_lints Make lint modules private Don't filter lints in code generation functions Build lint lists once and the reuse them to update files Get rid of Lint::is_internal method Clean up update_lints Downgrade inefficient_to_string to pedantic Downgrade trivially_copy_pass_by_ref to pedantic Downgrade let_unit_value to pedantic ```` Fixes #70993
2020-04-11End cleanup on rustdoc-js toolsGuillaume Gomez-417/+402
2020-04-11Store UNICODE_VERSION as a tuplePyfisch-1/+1
Remove the UnicodeVersion struct containing major, minor and update fields and replace it with a 3-tuple containing the version number. As the value of each field is limited to 255 use u8 to store them.
2020-04-11compiletest: support --pass=check and --pass=build for mir-opt tests.Eduard-Mihai Burtescu-7/+14
2020-04-11compiletest: diff direction should be (-)expected -> (+)actual.Eduard-Mihai Burtescu-1/+1