]>
git.lizzy.rs Git - rust.git/log
bors [Thu, 28 Nov 2019 09:30:16 +0000 (09:30 +0000)]
Auto merge of #4855 - phansch:rollup-x7yail7, r=phansch
Rollup of 3 pull requests
Successful merges:
- #4832 (Add some positive examples to lint docs)
- #4842 ([comparison_chain] #4827 Check `core::cmp::Ord` is implemented)
- #4847 (fixing a typo)
Failed merges:
changelog: none
r? @ghost
Phil Hansch [Thu, 28 Nov 2019 09:19:06 +0000 (10:19 +0100)]
Rollup merge of #4847 - rust-lang:offest, r=phansch
fixing a typo
changelog: none
Phil Hansch [Thu, 28 Nov 2019 09:19:05 +0000 (10:19 +0100)]
Rollup merge of #4842 - timbodeit:comparison-chain-false-positive-4827, r=flip1995
[comparison_chain] #4827 Check `core::cmp::Ord` is implemented
Only emit `comparison_chain` lint, if `cmp` is actually available on the type being compared. Don't emit lint in cases where only `PartialOrd` is implemented.
I haven't yet fully understood [Adjustments](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/adjustment/struct.Adjustment.html). I would appreciate, if someone could double check whether my usage of [expr_ty](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TypeckTables.html#method.expr_ty) in `clippy_lints/src/comparison_chain.rs:91` is correct or if there are cases where using [expr_ty_adjusted](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TypeckTables.html#method.expr_ty_adjusted) would lead to a different result when used with `utils::implements_trait`.
---
fixes #4827
changelog: [comparison_chain] Check `core::cmp::Ord` is implemented
Phil Hansch [Thu, 28 Nov 2019 09:19:04 +0000 (10:19 +0100)]
Rollup merge of #4832 - dario23:i4829, r=phansch
Add some positive examples to lint docs
fixes #4829
changelog: Add some positive examples to lint docs
bors [Thu, 28 Nov 2019 09:11:45 +0000 (09:11 +0000)]
Auto merge of #4851 - daxpedda:float-arithmetic, r=flip1995
Remove negative float literal checks.
Fixes #4850.
changelog: Remove negative float literal checks.
bors [Thu, 28 Nov 2019 08:53:36 +0000 (08:53 +0000)]
Auto merge of #4821 - Areredify:as_conversions, r=flip1995
Add `as_conversions` lint
changelog: closes #4771, adding a new pedantic allow-by-default lint that lints against any usage of `as`.
bors [Thu, 28 Nov 2019 07:26:04 +0000 (07:26 +0000)]
Auto merge of #4808 - euclio:string-lit-as-bytes, r=phansch
trigger string_lit_as_bytes when literal has escapes
---
changelog: fix string_lit_as_bytes false negative
Depends on rust-lang/rust#66349.
Fixes #4796.
bors [Thu, 28 Nov 2019 07:07:16 +0000 (07:07 +0000)]
Auto merge of #4848 - lzutao:result-map_or, r=flip1995
make use of Result::map_or
Fixes #1590
changelog: none
Lzu Tao [Tue, 26 Nov 2019 14:14:28 +0000 (14:14 +0000)]
make use of Result::map_or
bors [Wed, 27 Nov 2019 23:10:00 +0000 (23:10 +0000)]
Auto merge of #4846 - flip1995:rustup, r=Manishearth
Rustup to rustc 1.41.0-nightly (
e87a205c2 2019-11-27)
Rustups:
- rust-lang/rust#66671 (Ast address-of)
- rust-lang/rust#64856 (Scope format! temporaries)
- http://github.com/rust-lang/rust/pull/66719
changelog: none
Manish Goregaokar [Wed, 27 Nov 2019 22:41:22 +0000 (14:41 -0800)]
config.usize_ty -> config.ptr_width
From http://github.com/rust-lang/rust/pull/66719
Manish Goregaokar [Wed, 27 Nov 2019 22:47:20 +0000 (14:47 -0800)]
Add blank stderr file for cant_be_const test
Manish Goregaokar [Wed, 27 Nov 2019 22:43:22 +0000 (14:43 -0800)]
More borrowkind fixes
Manish Goregaokar [Wed, 27 Nov 2019 22:34:32 +0000 (14:34 -0800)]
Re-add wildcards for BorrowKind in some places
Manish Goregaokar [Wed, 27 Nov 2019 22:51:13 +0000 (14:51 -0800)]
Merge pull request #4852 from lzutao/cargo_install
rustup cargo install-upgrade
Manish Goregaokar [Wed, 27 Nov 2019 22:30:10 +0000 (14:30 -0800)]
Add BorrowKind::Ref
Lzu Tao [Wed, 27 Nov 2019 09:32:51 +0000 (16:32 +0700)]
rustup cargo install-upgrade
Andy Russell [Mon, 11 Nov 2019 22:42:12 +0000 (17:42 -0500)]
trigger string_lit_as_bytes when literal has escapes
daxpedda [Mon, 25 Nov 2019 18:23:28 +0000 (19:23 +0100)]
Remove negative float literal checks.
flip1995 [Mon, 25 Nov 2019 16:23:48 +0000 (17:23 +0100)]
Enable deny-warnings feature everywhere in CI
flip1995 [Mon, 25 Nov 2019 16:23:07 +0000 (17:23 +0100)]
Remove unused debugging feature
Mikhail Babenko [Fri, 15 Nov 2019 19:27:07 +0000 (22:27 +0300)]
implemented `as_conversions` lint
actuall add files
add better example and change pedantic to restriction
flip1995 [Mon, 25 Nov 2019 14:20:10 +0000 (15:20 +0100)]
Run rustfmt
Andre Bogus [Mon, 25 Nov 2019 13:06:34 +0000 (14:06 +0100)]
fixing a typo
flip1995 [Mon, 25 Nov 2019 12:56:24 +0000 (13:56 +0100)]
Rustup to rust-lang/rust#64856
flip1995 [Mon, 25 Nov 2019 12:18:38 +0000 (13:18 +0100)]
Rustup to rust-lang/rust#66671
Tim Bodeit [Sat, 23 Nov 2019 21:35:21 +0000 (22:35 +0100)]
[comparison_chain] #4827 Check `core::cmp::Ord` is implemented
Only emit lint, if `cmp` is actually available on the type being
compared. Don't emit lint in cases where only `PartialOrd` is
implemented.
bors [Sat, 23 Nov 2019 17:40:57 +0000 (17:40 +0000)]
Auto merge of #4840 - flip1995:rollup-jqk3a3i, r=flip1995
Rollup of 5 pull requests
Successful merges:
- #4730 (Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body)
- #4766 (Fix false positive in derive_hash_xor_eq)
- #4811 (Literal Representation Restructure)
- #4820 (doc: fix the comment above the lint function)
- #4830 (use more efficient code to generate repeated string)
Failed merges:
r? @ghost
changelog: none
Philipp Krones [Sat, 23 Nov 2019 17:16:03 +0000 (18:16 +0100)]
Rollup merge of #4830 - lzutao:str-repeat, r=flip1995
use more efficient code to generate repeated string
see https://rust.godbolt.org/z/z9vrFP for comparison
changelog: none
Philipp Krones [Sat, 23 Nov 2019 17:16:01 +0000 (18:16 +0100)]
Rollup merge of #4820 - guanqun:comment-fix, r=flip1995
doc: fix the comment above the lint function
it's a simple comment fix.
---
changelog: none
Philipp Krones [Sat, 23 Nov 2019 17:16:00 +0000 (18:16 +0100)]
Rollup merge of #4811 - mikerite:lit_repr_20191113, r=flip1995
Literal Representation Restructure
This pull request restructures the literal_representation module to be easier to understand and maintain. I split the changes into a lot of commits to make reviewing easier.
changelog: none
Philipp Krones [Sat, 23 Nov 2019 17:15:59 +0000 (18:15 +0100)]
Rollup merge of #4766 - phansch:fix_fp_in_derive_hash_xor_eq, r=flip1995
Fix false positive in derive_hash_xor_eq
This fixes a false positive in derive_hash_xor_eq where the lint was
triggering on user-defined traits called `Hash`.
changelog: Fix false positive in `derive_hash_xor_eq`
Fixes #4658
Philipp Krones [Sat, 23 Nov 2019 17:15:58 +0000 (18:15 +0100)]
Rollup merge of #4730 - yerke:fix-check_infinite_loop, r=flip1995
Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body
changelog: Fix check_infinite_loop (while_immutable_condition) by checking for break or return inside loop body
fixes #4648
bors [Sat, 23 Nov 2019 17:15:11 +0000 (17:15 +0000)]
Auto merge of #4839 - flip1995:rollup-new-lints, r=flip1995
Rollup of 4 Pull requests with new lints
Rollup of pull requests
- #4816 (New lint: zst_offset)
- #4814 (New lint: Implement ifs_same_cond_fn)
- #4807 (Add `large_stack_arrays` lint)
- #4806 (Issue/4623)
changelog: add [`zst_offset`] lint
changelog: New lint: [`ifs_same_cond_fn`]
cahngelog: Add new lint [large_stack_arrays]
changelog: added lint [`tabs_in_doc_comments`]
flip1995 [Sat, 23 Nov 2019 17:09:09 +0000 (18:09 +0100)]
Fix fallout
flip1995 [Sat, 23 Nov 2019 16:57:28 +0000 (17:57 +0100)]
Run update_lints
flip1995 [Sat, 23 Nov 2019 16:56:13 +0000 (17:56 +0100)]
Merge remote-tracking branch 'FlorianRohm/issue/4623' into rollup-new-lints
flip1995 [Sat, 23 Nov 2019 16:55:10 +0000 (17:55 +0100)]
Merge remote-tracking branch 'Areredify/large_stack_arrays' into rollup-new-lints
flip1995 [Sat, 23 Nov 2019 16:54:26 +0000 (17:54 +0100)]
Merge remote-tracking branch 'popzxc/if-same-cond-fn' into rollup-new-lints
flip1995 [Sat, 23 Nov 2019 16:53:41 +0000 (17:53 +0100)]
Merge remote-tracking branch 'upstream/zst-offset' into rollup-new-lints
bors [Sat, 23 Nov 2019 15:54:33 +0000 (15:54 +0000)]
Auto merge of #4825 - Manishearth:rustup, r=flip1995
Rustup to rustc 1.41.0-nightly (
35ef33a8 2019-11-21)
I don't have the right fix for the fmtstr tests, and I'm also hitting problems caused by https://github.com/messense/rustc-test/issues/3
List of rustups:
- rust-lang/rust#66271 (syntax: Keep string literals in ABIs and `asm!` more precisely)
- rust-lang/rust#65355 (Stabilize `!` in Rust 1.41.0)
- rust-lang/rust#66515 (Reduce size of `hir::Expr` by boxing more of `hir::InlineAsm`)
- rust-lang/rust#66389 (Specific labels when referring to "expected" and "found" types)
- rust-lang/rust#66074 ([mir-opt] Turn on the `ConstProp` pass by default)
changelog: none
flip1995 [Sat, 23 Nov 2019 15:49:47 +0000 (16:49 +0100)]
Disable chalk integration test. Output too large
flip1995 [Sat, 23 Nov 2019 15:47:59 +0000 (16:47 +0100)]
Temporarily disable serde integration test
ICEs because of rustc, not Clippy
flip1995 [Sat, 23 Nov 2019 00:26:19 +0000 (01:26 +0100)]
Add comment for mir_opt_level=0
Yerkebulan Tulibergenov [Fri, 25 Oct 2019 06:46:25 +0000 (23:46 -0700)]
fix check_infinite_loop by checking for break or return inside loop body
flip1995 [Fri, 22 Nov 2019 13:24:38 +0000 (14:24 +0100)]
Set mir_opt_level=0
This introduces some FNs. But a building Clippy is more important for now
flip1995 [Fri, 22 Nov 2019 12:46:20 +0000 (13:46 +0100)]
Rustup to rust-lang/rust#66389
flip1995 [Fri, 22 Nov 2019 12:25:38 +0000 (13:25 +0100)]
Rustup to rust-lang/rust#66515
Fixes #4835
flip1995 [Fri, 22 Nov 2019 12:24:17 +0000 (13:24 +0100)]
Remove never_type feature
Stablized in rust-lang/rust#65355
Igor Aleksanov [Thu, 14 Nov 2019 05:06:34 +0000 (08:06 +0300)]
Implement if_same_cond_fn lint
Run ./util/dev
Revert changelog entry
Rename lint to same_functions_in_if_condition and add a doc example
Add testcases with different arg in fn invocation
Johannes Schilling [Tue, 19 Nov 2019 19:14:09 +0000 (20:14 +0100)]
add a good example for the approx_const lint
Johannes Schilling [Tue, 19 Nov 2019 19:03:41 +0000 (20:03 +0100)]
Add suggested good cases in docs for lifetimes lint
lzutao [Tue, 19 Nov 2019 16:47:18 +0000 (23:47 +0700)]
use usize::from
Co-Authored-By: Mateusz MikuĊa <mati865@users.noreply.github.com>
Lzu Tao [Tue, 19 Nov 2019 16:08:50 +0000 (23:08 +0700)]
use more efficient code to generate repeated string
see https://rust.godbolt.org/z/z9vrFP for comparison
Manish Goregaokar [Tue, 19 Nov 2019 08:32:35 +0000 (00:32 -0800)]
Rustup to rustc 1.41.0-nightly (
d1da8023d 2019-11-19)
Manish Goregaokar [Mon, 18 Nov 2019 15:38:36 +0000 (07:38 -0800)]
Rustup to rustc 1.41.0-nightly (
a0d40f8bd 2019-11-18)
Andre Bogus [Thu, 14 Nov 2019 19:18:24 +0000 (20:18 +0100)]
New lint: zst_offset
Guanqun Lu [Fri, 15 Nov 2019 17:06:57 +0000 (01:06 +0800)]
doc: fix the comment above the lint function
Florian Rohm [Fri, 15 Nov 2019 15:20:21 +0000 (16:20 +0100)]
register new lint "tabs in doc comments" and update readme
Florian Rohm [Fri, 15 Nov 2019 15:18:08 +0000 (16:18 +0100)]
add new lint tabs in doc comments
bors [Thu, 14 Nov 2019 10:00:18 +0000 (10:00 +0000)]
Auto merge of #4815 - JohnTitor:rustup, r=matthiaskrgr
Rustup rust-lang/rust#66233
changelog: none
Yuki Okushi [Thu, 14 Nov 2019 08:13:07 +0000 (17:13 +0900)]
Rustup rust-lang/rust#66233
Michael Wright [Thu, 14 Nov 2019 06:08:24 +0000 (08:08 +0200)]
literal repr: ignore more warnings in macros
Michael Wright [Thu, 14 Nov 2019 05:42:04 +0000 (07:42 +0200)]
literal representation: simplification
Simplify calculation in grouping. Add test case to ensure `count()`
can't be zero in that branch.
Areredify [Tue, 12 Nov 2019 22:22:53 +0000 (22:22 +0000)]
Add new lint: large stack array
added documentation
minor style fix
change as to ::from
add ignore to doc
include threshold in lint message/make suggestion more apparent/use Scalar api instead of matching
style fix
shange snippet_opt to snippet
bors [Wed, 13 Nov 2019 18:07:23 +0000 (18:07 +0000)]
Auto merge of #4810 - Areredify:4716-fix, r=flip1995
clippy-driver display help on empty command line arguments
changelog: fixes #4716, now displaying help if clippy-driver is run with no arguments.
bors [Wed, 13 Nov 2019 13:13:14 +0000 (13:13 +0000)]
Auto merge of #4794 - rust-lang:no-must-use-impls, r=flip1995
no more must-use-candidate impls
This should help with #4779.
changelog: don't trigger [`must_use_candidate`] on trait impls
Michael Wright [Wed, 13 Nov 2019 06:28:50 +0000 (08:28 +0200)]
literal representation restructure 12
Export function for formatting literals and remove crate visibility from
other items.
Michael Wright [Wed, 13 Nov 2019 06:28:06 +0000 (08:28 +0200)]
literal representation restructure 11
Rename `grouping_hint` to `format` and use the term consistently.
Michael Wright [Wed, 13 Nov 2019 06:28:01 +0000 (08:28 +0200)]
literal representation restructure 10
Rename DigitInfo to NumericLiteral
Michael Wright [Wed, 13 Nov 2019 06:27:54 +0000 (08:27 +0200)]
literal representation restructure 9
Only store valid suffixes (and not mistyped suffixes) in DigitInfo.
Check for mistyped suffixes later and not when DigitInfo is created.
This opens the door to more sophisticated mistyped suffix checks later.
Michael Wright [Wed, 13 Nov 2019 06:27:49 +0000 (08:27 +0200)]
literal representation restructure 8
Store the digit parts directly in DigitInfo since we need them anyway.
Michael Wright [Wed, 13 Nov 2019 06:27:42 +0000 (08:27 +0200)]
literal representation restructure 7
Replace `do_lint` with `get_group_size`. Return `None` if there are no
groups.
Michael Wright [Wed, 13 Nov 2019 06:27:37 +0000 (08:27 +0200)]
literal representation restructure 6
Add `group_digits` helper function.
Michael Wright [Wed, 13 Nov 2019 06:27:27 +0000 (08:27 +0200)]
literal representation restructure 5
Use `split_digit_parts` in `check_lit`.
Michael Wright [Wed, 13 Nov 2019 06:27:19 +0000 (08:27 +0200)]
literal representation restructure 4
Simplify `grouping_hint` by splitting digits into parts and handling
one at a time.
Fixes #4762
Michael Wright [Wed, 13 Nov 2019 06:27:14 +0000 (08:27 +0200)]
literal representation restructure 3
Move suffix check into `check_lit` so that it isn't done repeatedly.
Michael Wright [Wed, 13 Nov 2019 06:27:05 +0000 (08:27 +0200)]
literal representation restructure 2
Consolidate warning handling using "poor man's try".
Michael Wright [Wed, 13 Nov 2019 06:26:52 +0000 (08:26 +0200)]
literal representation restructure 1
Combine macro expansion checks. Indentation is a little strange to
avoid rustfmt issue.
Mikhail Babenko [Wed, 13 Nov 2019 01:27:43 +0000 (04:27 +0300)]
display help on empty command line arguments
Andre Bogus [Tue, 12 Nov 2019 22:36:22 +0000 (23:36 +0100)]
no more must-use-candidate on trait impls
bors [Tue, 12 Nov 2019 13:56:14 +0000 (13:56 +0000)]
Auto merge of #4769 - euclio:crlf, r=flip1995
don't warn on CRLF in `with_newline` lints
changelog: don't warn on CRLF in `print_with_newline` and `write_with_newline`
fixes #4208.
This PR also transitions the unescaping logic to use the compiler's lexer.
Andy Russell [Sun, 3 Nov 2019 04:41:22 +0000 (00:41 -0400)]
don't warn on CRLF in `with_newline` lints
bors [Mon, 11 Nov 2019 19:24:20 +0000 (19:24 +0000)]
Auto merge of #4803 - tomprogrammer:issue-4732, r=phansch
Fix false positive in explicit_counter_loop lint
When the counter was used in a closure after the loop the lint didn't detect the
usage of the counter correctly.
changelog: Fix false positive in `explicit_counter_loop`
Fixes #4732
bors [Mon, 11 Nov 2019 18:59:06 +0000 (18:59 +0000)]
Auto merge of #4805 - Manishearth:rustup, r=phansch
Rustup to rustc 1.40.0-nightly (
56237d75b 2019-11-11)
changelog: none
Manish Goregaokar [Mon, 11 Nov 2019 17:24:12 +0000 (09:24 -0800)]
MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy
bors [Mon, 11 Nov 2019 11:28:27 +0000 (11:28 +0000)]
Auto merge of #4801 - mikerite:to_digit_is_some, r=flip1995
To digit is some
Add a lint that recommends replacing `to_digit().is_some()` with `is_digit()` on `char`s
changelog: Add lint `to_digit_is_some`
Thomas Bahn [Mon, 11 Nov 2019 10:27:18 +0000 (11:27 +0100)]
Fix false positive in explicit_counter_loop lint
When the counter was used in a closure after the loop the lint didn't detect the
usage of the counter correctly.
Philipp Hansch [Fri, 1 Nov 2019 19:12:08 +0000 (20:12 +0100)]
Fix false positive in derive_hash_xor_eq
This fixes a false positive in derive_hash_xor_eq where the lint was
triggering on user-defined traits called `Hash`.
bors [Mon, 11 Nov 2019 06:23:27 +0000 (06:23 +0000)]
Auto merge of #4780 - flip1995:ice_4775, r=phansch
Fix ICE #4775
Fixes #4775
changelog: Fix ICE with const_generics
bors [Mon, 11 Nov 2019 06:03:56 +0000 (06:03 +0000)]
Auto merge of #4802 - mikerite:fix-breakage-
20191111 , r=phansch
Fix breakage due to rust-lang/rust#65324
changelog: none
Michael Wright [Mon, 11 Nov 2019 04:22:50 +0000 (06:22 +0200)]
Fix breakage due to rust-lang/rust#65324
Michael Wright [Sun, 10 Nov 2019 16:00:04 +0000 (18:00 +0200)]
Really fix `to_digit_is_some` documentation
Michael Wright [Sun, 10 Nov 2019 15:55:25 +0000 (17:55 +0200)]
Fix `to_digit_is_some` documentation
Michael Wright [Sun, 10 Nov 2019 13:14:26 +0000 (15:14 +0200)]
Fix `to_digit_is_some` dogfood errors
Michael Wright [Sun, 10 Nov 2019 13:12:05 +0000 (15:12 +0200)]
Add `to_digit_is_some` lint
bors [Sun, 10 Nov 2019 04:51:23 +0000 (04:51 +0000)]
Auto merge of #4800 - msizanoen1:target-libs2, r=Manishearth
Only pass `--extern` flags for rlibs in target deps directory
It seems like there are proc macros/build scripts using serde: https://github.com/rust-lang/rust/pull/66207#issuecomment-
552159692
This fix the build error by only passing `--extern` flags for rlibs in target deps directory (if available, otherwise host deps directory).
r? @Manishearth
changelog: none
msizanoen1 [Sun, 10 Nov 2019 03:54:49 +0000 (10:54 +0700)]
Only pass rlibs in target deps directory
bors [Sun, 10 Nov 2019 01:10:12 +0000 (01:10 +0000)]
Auto merge of #4799 - Manishearth:rustup, r=yaahc
Rustup to rustc 1.40.0-nightly (
ac162c6ab 2019-11-09)
changelog: none
Manish Goregaokar [Sun, 10 Nov 2019 01:04:42 +0000 (17:04 -0800)]
Rustup to rustc 1.40.0-nightly (
ac162c6ab 2019-11-09)