]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMove use_self to nursery
Philipp Hansch [Fri, 29 Nov 2019 06:51:49 +0000 (07:51 +0100)]
Move use_self to nursery

Closes #4859

We have a lot of false positives in this lint, so I think it makes sense
to move this to the nursery until they are resolved.

changelog: Move `use_self` lint to nursery, due to many false positives

4 years agoUse `println!` on success instead of `eprintln!`
Philipp Krones [Thu, 28 Nov 2019 16:48:29 +0000 (17:48 +0100)]
Use `println!` on success instead of `eprintln!`

Co-Authored-By: Phil Hansch <dev@phansch.net>
4 years agoRevert "Disable chalk integration test. Output too large"
flip1995 [Sat, 23 Nov 2019 15:51:37 +0000 (16:51 +0100)]
Revert "Disable chalk integration test. Output too large"

This reverts commit 553db874d7183d33040807142b1f4f79441c1d4c.

4 years agoRemove the old integration-tests.sh script
flip1995 [Sat, 23 Nov 2019 15:22:20 +0000 (16:22 +0100)]
Remove the old integration-tests.sh script

4 years agoUse rust implementation for integration tests in CI
flip1995 [Sat, 23 Nov 2019 15:21:53 +0000 (16:21 +0100)]
Use rust implementation for integration tests in CI

4 years agoRust implementation of integration test
flip1995 [Sat, 23 Nov 2019 15:21:16 +0000 (16:21 +0100)]
Rust implementation of integration test

4 years agoDon't error on clippy.toml of dependencies
flip1995 [Sat, 23 Nov 2019 01:08:36 +0000 (02:08 +0100)]
Don't error on clippy.toml of dependencies

4 years agoFix categorizations
Manish Goregaokar [Thu, 28 Nov 2019 15:33:12 +0000 (07:33 -0800)]
Fix categorizations

4 years agoFix arguments on ExprUseVisitor::new
Manish Goregaokar [Thu, 28 Nov 2019 15:20:37 +0000 (07:20 -0800)]
Fix arguments on ExprUseVisitor::new

4 years agoeuv moved from middle to typeck
Manish Goregaokar [Thu, 28 Nov 2019 15:12:05 +0000 (07:12 -0800)]
euv moved from middle to typeck

4 years agocmt_ -> Place
Manish Goregaokar [Thu, 28 Nov 2019 15:09:02 +0000 (07:09 -0800)]
cmt_ -> Place

4 years agobuild: check if RTIM is not installed
Lzu Tao [Thu, 28 Nov 2019 11:12:01 +0000 (18:12 +0700)]
build: check if RTIM is not installed

4 years agoAuto merge of #4849 - flip1995:deny_warnings, r=phansch
bors [Thu, 28 Nov 2019 10:27:46 +0000 (10:27 +0000)]
Auto merge of #4849 - flip1995:deny_warnings, r=phansch

Deny warnings in CI

Removes the `debugging` feature, that wasn't used anymore and adds/enables the `deny-warnings` feature for every sub-crate of Clippy.

changelog: none

4 years agoAuto merge of #4855 - phansch:rollup-x7yail7, r=phansch
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

4 years agoRollup merge of #4847 - rust-lang:offest, r=phansch
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

4 years agoRollup merge of #4842 - timbodeit:comparison-chain-false-positive-4827, r=flip1995
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

4 years agoRollup merge of #4832 - dario23:i4829, r=phansch
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

4 years agoAuto merge of #4851 - daxpedda:float-arithmetic, r=flip1995
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.

4 years agoAuto merge of #4821 - Areredify:as_conversions, r=flip1995
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`.

4 years agoAuto merge of #4808 - euclio:string-lit-as-bytes, r=phansch
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.

4 years agoAuto merge of #4848 - lzutao:result-map_or, r=flip1995
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

4 years agomake use of Result::map_or
Lzu Tao [Tue, 26 Nov 2019 14:14:28 +0000 (14:14 +0000)]
make use of Result::map_or

4 years agoAuto merge of #4846 - flip1995:rustup, r=Manishearth
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

4 years agoconfig.usize_ty -> config.ptr_width
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

4 years agoAdd blank stderr file for cant_be_const test
Manish Goregaokar [Wed, 27 Nov 2019 22:47:20 +0000 (14:47 -0800)]
Add blank stderr file for cant_be_const test

4 years agoMore borrowkind fixes
Manish Goregaokar [Wed, 27 Nov 2019 22:43:22 +0000 (14:43 -0800)]
More borrowkind fixes

4 years agoRe-add wildcards for BorrowKind in some places
Manish Goregaokar [Wed, 27 Nov 2019 22:34:32 +0000 (14:34 -0800)]
Re-add wildcards for BorrowKind in some places

4 years agoMerge pull request #4852 from lzutao/cargo_install
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

4 years agoAdd BorrowKind::Ref
Manish Goregaokar [Wed, 27 Nov 2019 22:30:10 +0000 (14:30 -0800)]
Add BorrowKind::Ref

4 years agorustup cargo install-upgrade
Lzu Tao [Wed, 27 Nov 2019 09:32:51 +0000 (16:32 +0700)]
rustup cargo install-upgrade

4 years agotrigger string_lit_as_bytes when literal has escapes
Andy Russell [Mon, 11 Nov 2019 22:42:12 +0000 (17:42 -0500)]
trigger string_lit_as_bytes when literal has escapes

4 years agoRemove negative float literal checks.
daxpedda [Mon, 25 Nov 2019 18:23:28 +0000 (19:23 +0100)]
Remove negative float literal checks.

4 years agoEnable deny-warnings feature everywhere in CI
flip1995 [Mon, 25 Nov 2019 16:23:48 +0000 (17:23 +0100)]
Enable deny-warnings feature everywhere in CI

4 years agoRemove unused debugging feature
flip1995 [Mon, 25 Nov 2019 16:23:07 +0000 (17:23 +0100)]
Remove unused debugging feature

4 years agoimplemented `as_conversions` lint
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

4 years agoRun rustfmt
flip1995 [Mon, 25 Nov 2019 14:20:10 +0000 (15:20 +0100)]
Run rustfmt

4 years agofixing a typo
Andre Bogus [Mon, 25 Nov 2019 13:06:34 +0000 (14:06 +0100)]
fixing a typo

4 years agoRustup to rust-lang/rust#64856
flip1995 [Mon, 25 Nov 2019 12:56:24 +0000 (13:56 +0100)]
Rustup to rust-lang/rust#64856

4 years agoRustup to rust-lang/rust#66671
flip1995 [Mon, 25 Nov 2019 12:18:38 +0000 (13:18 +0100)]
Rustup to rust-lang/rust#66671

4 years ago[comparison_chain] #4827 Check `core::cmp::Ord` is implemented
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.

4 years agoAuto merge of #4840 - flip1995:rollup-jqk3a3i, r=flip1995
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

4 years agoRollup merge of #4830 - lzutao:str-repeat, r=flip1995
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

4 years agoRollup merge of #4820 - guanqun:comment-fix, r=flip1995
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

4 years agoRollup merge of #4811 - mikerite:lit_repr_20191113, r=flip1995
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

4 years agoRollup merge of #4766 - phansch:fix_fp_in_derive_hash_xor_eq, r=flip1995
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

4 years agoRollup merge of #4730 - yerke:fix-check_infinite_loop, r=flip1995
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

4 years agoAuto merge of #4839 - flip1995:rollup-new-lints, r=flip1995
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`]

4 years agoFix fallout
flip1995 [Sat, 23 Nov 2019 17:09:09 +0000 (18:09 +0100)]
Fix fallout

4 years agoRun update_lints
flip1995 [Sat, 23 Nov 2019 16:57:28 +0000 (17:57 +0100)]
Run update_lints

4 years agoMerge remote-tracking branch 'FlorianRohm/issue/4623' into rollup-new-lints
flip1995 [Sat, 23 Nov 2019 16:56:13 +0000 (17:56 +0100)]
Merge remote-tracking branch 'FlorianRohm/issue/4623' into rollup-new-lints

4 years agoMerge remote-tracking branch 'Areredify/large_stack_arrays' 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

4 years agoMerge remote-tracking branch 'popzxc/if-same-cond-fn' 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

4 years agoMerge remote-tracking branch 'upstream/zst-offset' 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

4 years agoAuto merge of #4825 - Manishearth:rustup, r=flip1995
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

4 years agoDisable chalk integration test. Output too large
flip1995 [Sat, 23 Nov 2019 15:49:47 +0000 (16:49 +0100)]
Disable chalk integration test. Output too large

4 years agoTemporarily disable serde integration test
flip1995 [Sat, 23 Nov 2019 15:47:59 +0000 (16:47 +0100)]
Temporarily disable serde integration test

ICEs because of rustc, not Clippy

4 years agoAdd comment for mir_opt_level=0
flip1995 [Sat, 23 Nov 2019 00:26:19 +0000 (01:26 +0100)]
Add comment for mir_opt_level=0

4 years agofix check_infinite_loop by checking for break or return inside loop body
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

4 years agoSet mir_opt_level=0
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

4 years agoRustup to rust-lang/rust#66389
flip1995 [Fri, 22 Nov 2019 12:46:20 +0000 (13:46 +0100)]
Rustup to rust-lang/rust#66389

4 years agoRustup to rust-lang/rust#66515
flip1995 [Fri, 22 Nov 2019 12:25:38 +0000 (13:25 +0100)]
Rustup to rust-lang/rust#66515

Fixes #4835

4 years agoRemove never_type feature
flip1995 [Fri, 22 Nov 2019 12:24:17 +0000 (13:24 +0100)]
Remove never_type feature

Stablized in rust-lang/rust#65355

4 years agoImplement if_same_cond_fn lint
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

4 years agoadd a good example for the approx_const lint
Johannes Schilling [Tue, 19 Nov 2019 19:14:09 +0000 (20:14 +0100)]
add a good example for the approx_const lint

4 years agoAdd suggested good cases in docs for lifetimes lint
Johannes Schilling [Tue, 19 Nov 2019 19:03:41 +0000 (20:03 +0100)]
Add suggested good cases in docs for lifetimes lint

4 years agouse usize::from
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>
4 years agouse more efficient code to generate repeated string
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

4 years agoRustup to rustc 1.41.0-nightly (d1da8023d 2019-11-19)
Manish Goregaokar [Tue, 19 Nov 2019 08:32:35 +0000 (00:32 -0800)]
Rustup to rustc 1.41.0-nightly (d1da8023d 2019-11-19)

4 years agoRustup to rustc 1.41.0-nightly (a0d40f8bd 2019-11-18)
Manish Goregaokar [Mon, 18 Nov 2019 15:38:36 +0000 (07:38 -0800)]
Rustup to rustc 1.41.0-nightly (a0d40f8bd 2019-11-18)

4 years agoNew lint: zst_offset
Andre Bogus [Thu, 14 Nov 2019 19:18:24 +0000 (20:18 +0100)]
New lint: zst_offset

4 years agodoc: fix the comment above the lint function
Guanqun Lu [Fri, 15 Nov 2019 17:06:57 +0000 (01:06 +0800)]
doc: fix the comment above the lint function

4 years agoregister new lint "tabs in doc comments" and update readme
Florian Rohm [Fri, 15 Nov 2019 15:20:21 +0000 (16:20 +0100)]
register new lint "tabs in doc comments" and update readme

4 years agoadd new lint tabs in doc comments
Florian Rohm [Fri, 15 Nov 2019 15:18:08 +0000 (16:18 +0100)]
add new lint  tabs in doc comments

4 years agoAuto merge of #4815 - JohnTitor:rustup, r=matthiaskrgr
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

4 years agoRustup rust-lang/rust#66233
Yuki Okushi [Thu, 14 Nov 2019 08:13:07 +0000 (17:13 +0900)]
Rustup rust-lang/rust#66233

4 years agoliteral repr: ignore more warnings in macros
Michael Wright [Thu, 14 Nov 2019 06:08:24 +0000 (08:08 +0200)]
literal repr: ignore more warnings in macros

4 years agoliteral representation: simplification
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.

4 years agoAdd new lint: large stack array
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

4 years agoAuto merge of #4810 - Areredify:4716-fix, r=flip1995
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.

4 years agoAuto merge of #4794 - rust-lang:no-must-use-impls, r=flip1995
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

4 years agoliteral representation restructure 12
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.

4 years agoliteral representation restructure 11
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.

4 years agoliteral representation restructure 10
Michael Wright [Wed, 13 Nov 2019 06:28:01 +0000 (08:28 +0200)]
literal representation restructure 10

Rename DigitInfo to NumericLiteral

4 years agoliteral representation restructure 9
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.

4 years agoliteral representation restructure 8
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.

4 years agoliteral representation restructure 7
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.

4 years agoliteral representation restructure 6
Michael Wright [Wed, 13 Nov 2019 06:27:37 +0000 (08:27 +0200)]
literal representation restructure 6

Add `group_digits` helper function.

4 years agoliteral representation restructure 5
Michael Wright [Wed, 13 Nov 2019 06:27:27 +0000 (08:27 +0200)]
literal representation restructure 5

Use `split_digit_parts` in `check_lit`.

4 years agoliteral representation restructure 4
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

4 years agoliteral representation restructure 3
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.

4 years agoliteral representation restructure 2
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".

4 years agoliteral representation restructure 1
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.

4 years agodisplay help on empty command line arguments
Mikhail Babenko [Wed, 13 Nov 2019 01:27:43 +0000 (04:27 +0300)]
display help on empty command line arguments

4 years agono more must-use-candidate on trait impls
Andre Bogus [Tue, 12 Nov 2019 22:36:22 +0000 (23:36 +0100)]
no more must-use-candidate on trait impls

4 years agoAuto merge of #4769 - euclio:crlf, r=flip1995
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.

4 years agodon't warn on CRLF in `with_newline` lints
Andy Russell [Sun, 3 Nov 2019 04:41:22 +0000 (00:41 -0400)]
don't warn on CRLF in `with_newline` lints

4 years agoAuto merge of #4803 - tomprogrammer:issue-4732, r=phansch
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

4 years agoAuto merge of #4805 - Manishearth:rustup, r=phansch
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

4 years agoMutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy
Manish Goregaokar [Mon, 11 Nov 2019 17:24:12 +0000 (09:24 -0800)]
MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy

4 years agoAuto merge of #4801 - mikerite:to_digit_is_some, r=flip1995
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`