]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMerge branch 'rustup'
Manish Goregaokar [Fri, 23 Feb 2018 17:03:18 +0000 (09:03 -0800)]
Merge branch 'rustup'

6 years agoUpdate Rust to 063deba92e
Manish Goregaokar [Fri, 23 Feb 2018 16:59:42 +0000 (08:59 -0800)]
Update Rust to 063deba92e

6 years agoMerge pull request #2471 from bootandy/fix_span2
Oliver Schneider [Fri, 23 Feb 2018 07:31:57 +0000 (08:31 +0100)]
Merge pull request #2471 from bootandy/fix_span2

Fix: point to correct problem part of code, update test

6 years agoDo not pass Span by reference
bootandy [Thu, 22 Feb 2018 15:11:20 +0000 (10:11 -0500)]
Do not pass Span by reference

6 years agoMerge pull request #2473 from phansch/handle_multiline_attributes
Oliver Schneider [Wed, 21 Feb 2018 20:44:04 +0000 (21:44 +0100)]
Merge pull request #2473 from phansch/handle_multiline_attributes

Lint multiline attributes properly

6 years agoLint multiline attributes properly
Philipp Hansch [Wed, 21 Feb 2018 20:11:38 +0000 (21:11 +0100)]
Lint multiline attributes properly

This makes it so that the `empty_line_after_outer_attribute` lint only
checks for newlines between the end of the attribute and the beginning
of the following item.

We need to check for the empty line count being bigger than 2 because
now the snippet of valid code contains only `\n` and splitting it
produces `["", ""]`
Invalid code will contain more than 2 empty strings.

6 years agoStop unwanted newlines being applied on unwrap_or
bootandy [Wed, 21 Feb 2018 16:25:18 +0000 (11:25 -0500)]
Stop unwanted newlines being applied on unwrap_or

6 years agoSimplify creation of span_replace_word
bootandy [Tue, 20 Feb 2018 17:38:20 +0000 (12:38 -0500)]
Simplify creation of span_replace_word

Part of unwrap_or test

6 years agoAdd newlines in unwrap_or ui test
bootandy [Tue, 20 Feb 2018 17:37:30 +0000 (12:37 -0500)]
Add newlines in unwrap_or ui test

6 years agoMerge pull request #2459 from phansch/mention_how_to_run_single_test
Oliver Schneider [Tue, 20 Feb 2018 07:33:47 +0000 (08:33 +0100)]
Merge pull request #2459 from phansch/mention_how_to_run_single_test

Explain how to execute a single UI test

6 years agoMerge pull request #2458 from flip1995/suspicious_impl
Oliver Schneider [Tue, 20 Feb 2018 07:32:01 +0000 (08:32 +0100)]
Merge pull request #2458 from flip1995/suspicious_impl

Lint for suspicious implementations of arithmetic std::ops traits

6 years agoMerge pull request #2470 from flip1995/doc_conf
Oliver Schneider [Tue, 20 Feb 2018 07:26:22 +0000 (08:26 +0100)]
Merge pull request #2470 from flip1995/doc_conf

Fix name of configuration parameters in documentation

6 years agoFix: point to correct problem part of code
bootandy [Thu, 15 Feb 2018 14:56:12 +0000 (09:56 -0500)]
Fix: point to correct problem part of code

Fix span so it no longer contains the whole train-wreck of code and only
points to the problem function (for the unwrap_or lint).

https://github.com/rust-lang-nursery/rust-clippy/issues/2422

Update ui test methods - it had several cases where the error message
span is now shorter

6 years agoFix name of configuration parameters in documentation
flip1995 [Mon, 19 Feb 2018 15:30:19 +0000 (16:30 +0100)]
Fix name of configuration parameters in documentation

6 years agoMerge branch 'master' into suspicious_impl
Philipp Krones [Mon, 19 Feb 2018 12:04:14 +0000 (13:04 +0100)]
Merge branch 'master' into suspicious_impl

6 years agoMerge pull request #2451 from TomasKralCZ/rdn-fields
Oliver Schneider [Mon, 19 Feb 2018 08:56:55 +0000 (09:56 +0100)]
Merge pull request #2451 from TomasKralCZ/rdn-fields

Implement redundant field names lint #2244

6 years agoExplain how to execute a single UI test
Philipp Hansch [Tue, 13 Feb 2018 21:33:42 +0000 (22:33 +0100)]
Explain how to execute a single UI test

6 years agoLint for suspicious implementations of arithmetic std::ops traits
flip1995 [Tue, 13 Feb 2018 14:40:17 +0000 (15:40 +0100)]
Lint for suspicious implementations of arithmetic std::ops traits

6 years agoSuggestion fixed, simplified lint logic.
TomasKralCZ [Sun, 11 Feb 2018 09:50:19 +0000 (10:50 +0100)]
Suggestion fixed, simplified lint logic.

6 years agoImplement redundant field names lint #2244
TomasKralCZ [Sat, 10 Feb 2018 20:13:17 +0000 (21:13 +0100)]
Implement redundant field names lint #2244

6 years agoMerge pull request #2448 from rust-lang-nursery/fixes
Oliver Schneider [Fri, 9 Feb 2018 17:32:23 +0000 (18:32 +0100)]
Merge pull request #2448 from rust-lang-nursery/fixes

Fixes

6 years agoFixes #2426 (if_same_then_else false positive)
Oliver Schneider [Fri, 9 Feb 2018 14:23:51 +0000 (15:23 +0100)]
Fixes #2426 (if_same_then_else false positive)

6 years agoFix #2427
Oliver Schneider [Fri, 9 Feb 2018 13:22:50 +0000 (14:22 +0100)]
Fix  #2427

6 years agoRemove rarely used `type_size` helper function
Oliver Schneider [Fri, 9 Feb 2018 13:22:41 +0000 (14:22 +0100)]
Remove rarely used `type_size` helper function

6 years agoMerge pull request #2446 from goodmanjonathan/fix-copies-test
Oliver Schneider [Fri, 9 Feb 2018 11:41:08 +0000 (12:41 +0100)]
Merge pull request #2446 from goodmanjonathan/fix-copies-test

Make several tests actually test the correct lints

6 years agoMerge pull request #2445 from guido4000/patch-1
Oliver Schneider [Fri, 9 Feb 2018 07:06:51 +0000 (08:06 +0100)]
Merge pull request #2445 from guido4000/patch-1

Simplify recommended command

6 years agomake the copies.rs test actually test the correct lints
Jonathan Goodman [Thu, 8 Feb 2018 19:26:50 +0000 (13:26 -0600)]
make the copies.rs test actually test the correct lints

6 years agoChange command to run clippy without installation
Guido [Thu, 8 Feb 2018 11:37:56 +0000 (12:37 +0100)]
Change command to run clippy without installation

6 years agoSimplify recommended command
Guido [Wed, 7 Feb 2018 18:24:38 +0000 (19:24 +0100)]
Simplify recommended command

6 years agoMerge pull request #2444 from phansch/fix_incorrect_useless_attribute_suggestion
Oliver Schneider [Wed, 7 Feb 2018 08:07:46 +0000 (09:07 +0100)]
Merge pull request #2444 from phansch/fix_incorrect_useless_attribute_suggestion

Partly fix incorrect useless_attribute suggestion

6 years agoPartly fix incorrect useless_attribute suggestion
Philipp Hansch [Tue, 6 Feb 2018 21:14:23 +0000 (22:14 +0100)]
Partly fix incorrect useless_attribute suggestion

This fixes an incorrect suggestion from the `useless_attribute` lint
when using `cfg_attr`.

Additionally, it will not show a suggestion anymore, if the attribute
begins on a previous line, because it is much harder to construct the
span of multi-line `cfg_attr` attributes as they don't appear in the AST.

To fix it completely, one would have to parse upwards into the file,
and find the beginning of the `cfg_attr` attribute.

6 years agoMerge pull request #2443 from goodmanjonathan/fix-2438
Oliver Schneider [Tue, 6 Feb 2018 18:35:26 +0000 (19:35 +0100)]
Merge pull request #2443 from goodmanjonathan/fix-2438

Don't suggest eliding 'static on associated consts

6 years agodon't suggest eliding 'static on associated consts
Jonathan Goodman [Tue, 6 Feb 2018 18:22:34 +0000 (12:22 -0600)]
don't suggest eliding 'static on associated consts

6 years agoMerge pull request #2441 from flip1995/literal_rep
Oliver Schneider [Tue, 6 Feb 2018 12:47:28 +0000 (13:47 +0100)]
Merge pull request #2441 from flip1995/literal_rep

Make decimal_literal_representation a restriction lint

6 years agoMake decimal_literal_representation a restriction lint
flip1995 [Tue, 6 Feb 2018 12:05:20 +0000 (13:05 +0100)]
Make decimal_literal_representation a restriction lint

6 years agoMerge pull request #2439 from gnieto/fix/cterror
Oliver Schneider [Tue, 6 Feb 2018 08:19:51 +0000 (09:19 +0100)]
Merge pull request #2439 from gnieto/fix/cterror

Fix ICE comparing `ExprRange` equality

6 years agoFix ICE comparing `ExprRange`
Guillem Nieto [Mon, 5 Feb 2018 23:31:06 +0000 (00:31 +0100)]
Fix ICE comparing `ExprRange`

`eq_expr` on hir::utils was throwing an ICE due to an invalid
LateContext being used. Due to this missusage, it was generating an ICE
with the code on the following issue:
https://github.com/rust-lang-nursery/rust-clippy/issues/2423

6 years agoCleanup calls to `layout_of`
Oliver Schneider [Mon, 5 Feb 2018 10:28:09 +0000 (11:28 +0100)]
Cleanup calls to `layout_of`

6 years agoVersion Bump
Oliver Schneider [Mon, 5 Feb 2018 07:48:40 +0000 (08:48 +0100)]
Version Bump

6 years agoMerge pull request #2433 from kimsnj/matches_sugg
Oliver Schneider [Mon, 5 Feb 2018 07:21:21 +0000 (08:21 +0100)]
Merge pull request #2433 from kimsnj/matches_sugg

Fix suggestions for ref matches

6 years agoMerge pull request #2415 from HMPerson1/fix-2356
Oliver Schneider [Mon, 5 Feb 2018 07:19:11 +0000 (08:19 +0100)]
Merge pull request #2415 from HMPerson1/fix-2356

Fix `ImplItem`s being ignored

6 years agoMerge pull request #2428 from phansch/fix_lint_list_issues
Oliver Schneider [Mon, 5 Feb 2018 07:18:20 +0000 (08:18 +0100)]
Merge pull request #2428 from phansch/fix_lint_list_issues

Allow empty lines in lint doc examples

6 years agoMerge pull request #2419 from phansch/fix_doc_comment_false_positive
Oliver Schneider [Mon, 5 Feb 2018 07:17:29 +0000 (08:17 +0100)]
Merge pull request #2419 from phansch/fix_doc_comment_false_positive

Fix false positive in empty_line_after_outer_attr

6 years agoMerge pull request #2436 from messense/rustup
Oliver Schneider [Mon, 5 Feb 2018 07:08:15 +0000 (08:08 +0100)]
Merge pull request #2436 from messense/rustup

Rustup to rustc 1.25.0-nightly (0c6091fbd 2018-02-04)

6 years agoRustup to rustc 1.25.0-nightly (0c6091fbd 2018-02-04)
messense [Mon, 5 Feb 2018 04:16:17 +0000 (12:16 +0800)]
Rustup to rustc 1.25.0-nightly (0c6091fbd 2018-02-04)

6 years agoRemoving extra newline
Karim Snj [Sun, 4 Feb 2018 12:55:37 +0000 (13:55 +0100)]
Removing extra newline

6 years agoFix suggestions for ref matches
Karim Snj [Sun, 4 Feb 2018 12:41:54 +0000 (13:41 +0100)]
Fix suggestions for ref matches

6 years agoBump to 0.0.185
Manish Goregaokar [Fri, 2 Feb 2018 07:53:32 +0000 (13:23 +0530)]
Bump to 0.0.185

6 years agoFix `const_static_lifetime`
HMPerson1 [Fri, 2 Feb 2018 07:03:21 +0000 (02:03 -0500)]
Fix `const_static_lifetime`

6 years agoMerge pull request #2430 from Frederick888/fix-2429
Manish Goregaokar [Fri, 2 Feb 2018 07:00:46 +0000 (12:30 +0530)]
Merge pull request #2430 from Frederick888/fix-2429

set CodeSuggestion approximate to false. fixes #2429

6 years agoFix `non_expressive_names`
HMPerson1 [Fri, 2 Feb 2018 06:49:47 +0000 (01:49 -0500)]
Fix `non_expressive_names`

6 years agoFix `get_enclosing_block`
HMPerson1 [Tue, 30 Jan 2018 19:52:45 +0000 (14:52 -0500)]
Fix `get_enclosing_block`

6 years agoset CodeSuggestion approximate to false. fixes #2429
Frederick Zhang [Fri, 2 Feb 2018 05:24:32 +0000 (16:24 +1100)]
set CodeSuggestion approximate to false. fixes #2429

6 years agoAllow empty lines in lint doc examples
Philipp Hansch [Thu, 1 Feb 2018 22:04:59 +0000 (23:04 +0100)]
Allow empty lines in lint doc examples

This makes sure that empty lines in lint examples are preserved.

It also fixes the documentation for the invalid_ref lint, which was not
shown because of an extra newline before the lint declaration.

6 years agoGive travis a guaranteed existing directory for ui test output
Oliver Schneider [Thu, 1 Feb 2018 13:35:56 +0000 (14:35 +0100)]
Give travis a guaranteed existing directory for ui test output

6 years agoMerge pull request #2417 from mathstuf/gitignore-support-symlinks
Oliver Schneider [Thu, 1 Feb 2018 07:09:25 +0000 (08:09 +0100)]
Merge pull request #2417 from mathstuf/gitignore-support-symlinks

gitignore: support ignoring target as symlinks

6 years agoFix false positive in empty_line_after_outer_attr
Philipp Hansch [Thu, 1 Feb 2018 06:43:03 +0000 (07:43 +0100)]
Fix false positive in empty_line_after_outer_attr

Doc comments are syntactic sugar for #[doc] attributes, so this lint was
catching them, too.

This commit makes it so that doc comments are ignored in this lint.

I think, for normal attributes it makes sense to warn about following empty
lines, for doc comments, less. This way the user has some freedom over
the formatting.

6 years agogitignore: support ignoring target as symlinks
Ben Boeckel [Wed, 31 Jan 2018 19:51:40 +0000 (14:51 -0500)]
gitignore: support ignoring target as symlinks

6 years agoMerge pull request #2410 from gnieto/task/questionMarkIso
Oliver Schneider [Wed, 31 Jan 2018 07:27:53 +0000 (08:27 +0100)]
Merge pull request #2410 from gnieto/task/questionMarkIso

Question mark lint

6 years agoUpdate UI tests
Guillem Nieto [Tue, 30 Jan 2018 23:09:16 +0000 (00:09 +0100)]
Update UI tests

6 years agoAdd question mark operator
Guillem Nieto [Sun, 28 Jan 2018 00:04:22 +0000 (01:04 +0100)]
Add question mark operator

6 years agoMerge pull request #2413 from flip1995/assign_ops
Oliver Schneider [Tue, 30 Jan 2018 18:17:38 +0000 (19:17 +0100)]
Merge pull request #2413 from flip1995/assign_ops

Improved suggestion on misrefactored_assign_op lint

6 years agoAdditionally suggest the semantic equal variant
flip1995 [Tue, 30 Jan 2018 16:45:35 +0000 (17:45 +0100)]
Additionally suggest the semantic equal variant

6 years agoVersion bump
Oliver Schneider [Tue, 30 Jan 2018 14:02:47 +0000 (15:02 +0100)]
Version bump

6 years agoImproved suggestion on misrefactored_assign_op lint. Fixes #1239
flip1995 [Tue, 30 Jan 2018 13:58:38 +0000 (14:58 +0100)]
Improved suggestion on misrefactored_assign_op lint. Fixes #1239

6 years agoMerge pull request #2340 from phansch/newline_after_attributes
Oliver Schneider [Tue, 30 Jan 2018 12:09:23 +0000 (13:09 +0100)]
Merge pull request #2340 from phansch/newline_after_attributes

Warn on empty lines after outer attributes

6 years agoMerge pull request #2412 from topecongiro/double-comparison
Oliver Schneider [Tue, 30 Jan 2018 08:31:56 +0000 (09:31 +0100)]
Merge pull request #2412 from topecongiro/double-comparison

Add double comparison lint

6 years agoAdd double comparions lint
Seiichi Uchida [Tue, 30 Jan 2018 01:35:35 +0000 (10:35 +0900)]
Add double comparions lint

6 years agoRustup to rustc 1.25.0-nightly (90eb44a58 2018-01-29)
Seiichi Uchida [Tue, 30 Jan 2018 01:35:22 +0000 (10:35 +0900)]
Rustup to rustc 1.25.0-nightly (90eb44a58 2018-01-29)

6 years agoMerge pull request #2409 from montrivo/while_let_on_iterator
Oliver Schneider [Mon, 29 Jan 2018 18:21:00 +0000 (19:21 +0100)]
Merge pull request #2409 from montrivo/while_let_on_iterator

#1121: already fixed, adding a test

6 years ago#1121: already fixed, adding a test
Tim Nielens [Mon, 29 Jan 2018 15:52:22 +0000 (16:52 +0100)]
#1121: already fixed, adding a test

6 years agoAdd workaround for hidden outer attribute
Philipp Hansch [Fri, 26 Jan 2018 06:51:27 +0000 (07:51 +0100)]
Add workaround for hidden outer attribute

If the snippet is empty, it's an attribute that was inserted during macro
expansion and we want to ignore those, because they could come from external
sources that the user has no control over.
For some reason these attributes don't have any expansion info on them, so
we have to check it this way until there is a better way.

6 years agoMake lint work on all members of ast::Item_
Philipp Hansch [Tue, 23 Jan 2018 20:32:06 +0000 (21:32 +0100)]
Make lint work on all members of ast::Item_

6 years agoAdd test case for comments between item and attr
Philipp Hansch [Fri, 19 Jan 2018 07:18:29 +0000 (08:18 +0100)]
Add test case for comments between item and attr

6 years agoWarn on empty lines after outer attributes
Philipp Hansch [Mon, 8 Jan 2018 23:22:42 +0000 (00:22 +0100)]
Warn on empty lines after outer attributes

6 years agoBump to 0.0.183
Manish Goregaokar [Mon, 29 Jan 2018 05:50:29 +0000 (11:20 +0530)]
Bump to 0.0.183

6 years agoBump compiletest version
Manish Goregaokar [Mon, 29 Jan 2018 05:50:17 +0000 (11:20 +0530)]
Bump compiletest version

6 years agoMerge pull request #2408 from rust-lang-nursery/rustup
Manish Goregaokar [Mon, 29 Jan 2018 05:47:50 +0000 (11:17 +0530)]
Merge pull request #2408 from rust-lang-nursery/rustup

Rustup to rustc 1.25.0-nightly (21882aad7 2018-01-28)

6 years agoUpdate spans
Manish Goregaokar [Mon, 29 Jan 2018 04:18:11 +0000 (09:48 +0530)]
Update spans

6 years agomut_mut_macro is missing plugin(clippy)
Manish Goregaokar [Mon, 29 Jan 2018 04:18:06 +0000 (09:48 +0530)]
mut_mut_macro is missing plugin(clippy)

6 years agoRemove an unused binary file
Seiichi Uchida [Sun, 28 Jan 2018 20:37:47 +0000 (05:37 +0900)]
Remove an unused binary file

6 years agoRustup to rustc 1.25.0-nightly (7d6e5b9da 2018-01-27)
Seiichi Uchida [Sun, 28 Jan 2018 07:28:48 +0000 (16:28 +0900)]
Rustup to rustc 1.25.0-nightly (7d6e5b9da 2018-01-27)

6 years agoMerge pull request #2403 from mikerite/fix_compile_2
Manish Goregaokar [Sat, 27 Jan 2018 13:37:53 +0000 (19:07 +0530)]
Merge pull request #2403 from mikerite/fix_compile_2

Fix compilation

6 years agoFix compilation
Michael Wright [Sat, 27 Jan 2018 12:57:31 +0000 (14:57 +0200)]
Fix compilation

Fix the compilation broken by these two changes:
+ https://github.com/rust-lang/rust/commit/2d56abfbebdc905dafc9cf9edc0a6f58e4de7cbd#diff-7fceb7ede15b205bf5ad812c31d75384L1459
+ https://github.com/rust-lang/rust/commit/ccf0d8399e1ef3ed6bf7005650ce42aa646b5cc7#diff-64b696b0ef6ad44140e973801ed82b25L2771

6 years agoMerge pull request #2400 from devonhollowood/misaligned-transmute
Manish Goregaokar [Thu, 25 Jan 2018 09:13:09 +0000 (14:43 +0530)]
Merge pull request #2400 from devonhollowood/misaligned-transmute

Add misaligned_transmute lint

6 years agoAdd misaligned_transmute lint
Devon Hollowood [Thu, 25 Jan 2018 08:33:41 +0000 (00:33 -0800)]
Add misaligned_transmute lint

6 years agoMerge pull request #2399 from rust-lang-nursery/rustup
Oliver Schneider [Thu, 25 Jan 2018 08:02:05 +0000 (09:02 +0100)]
Merge pull request #2399 from rust-lang-nursery/rustup

Rustup to rustc 1.25.0-nightly (a0dcecff9 2018-01-24)

6 years agoVersion Bump
Oliver Schneider [Thu, 25 Jan 2018 07:58:47 +0000 (08:58 +0100)]
Version Bump

6 years agoRustup to rustc 1.25.0-nightly (a0dcecff9 2018-01-24)
Manish Goregaokar [Thu, 25 Jan 2018 07:44:04 +0000 (13:14 +0530)]
Rustup to rustc 1.25.0-nightly (a0dcecff9 2018-01-24)

6 years agoAdd known false positive for enum_glob_use
Manish Goregaokar [Thu, 25 Jan 2018 07:25:58 +0000 (12:55 +0530)]
Add known false positive for enum_glob_use

6 years agoMerge pull request #2396 from rust-lang-nursery/author
Oliver Schneider [Wed, 24 Jan 2018 12:51:29 +0000 (13:51 +0100)]
Merge pull request #2396 from rust-lang-nursery/author

Enable more patterns in the author lint

6 years agoEnable more patterns in the author lint
Oliver Schneider [Wed, 24 Jan 2018 12:04:06 +0000 (13:04 +0100)]
Enable more patterns in the author lint

6 years agoMerge pull request #2393 from flip1995/regex
Oliver Schneider [Tue, 23 Jan 2018 17:12:54 +0000 (18:12 +0100)]
Merge pull request #2393 from flip1995/regex

Let invalid_regex point to the right place for raw strings

6 years agolet invalid_regex point to the right place for raw strings
flip1995 [Tue, 23 Jan 2018 15:52:14 +0000 (16:52 +0100)]
let invalid_regex point to the right place for raw strings

6 years agoMerge pull request #2362 from flip1995/master
Oliver Schneider [Tue, 23 Jan 2018 14:54:35 +0000 (15:54 +0100)]
Merge pull request #2362 from flip1995/master

Lint for numeric literals that have a better representation

6 years agoApply requested changes
flip1995 [Tue, 23 Jan 2018 14:29:31 +0000 (15:29 +0100)]
Apply requested changes

6 years agoAdapt to updated ui tests
flip1995 [Tue, 23 Jan 2018 11:52:20 +0000 (12:52 +0100)]
Adapt to updated ui tests

6 years agoAdd configurable threshold, default: 4096
flip1995 [Tue, 23 Jan 2018 11:34:40 +0000 (12:34 +0100)]
Add configurable threshold, default: 4096

6 years agoMerge pull request #2392 from theotherphil/bugfix
Oliver Schneider [Mon, 22 Jan 2018 07:14:52 +0000 (08:14 +0100)]
Merge pull request #2392 from theotherphil/bugfix

Fix unnecessary_fold bug

6 years agoUse existing match_var function
Phil Ellison [Mon, 22 Jan 2018 05:46:32 +0000 (05:46 +0000)]
Use existing match_var function