Commit graph

53 commits

Author SHA1 Message Date
Philipp Krones
a1b75c5108 Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup 2023-04-23 13:28:56 +02:00
Arpad Borsos
90afb207eb Remove identity_future indirection
This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm.

Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
2023-03-08 15:37:14 +01:00
Arpad Borsos
1ebdcca8b9 Avoid GenFuture shim when compiling async constructs
Previously, async constructs would be lowered to "normal" generators,
with an additional `from_generator` / `GenFuture` shim in between to
convert from `Generator` to `Future`.

The compiler will now special-case these generators internally so that
async constructs will *directly* implement `Future` without the need
to go through the `from_generator` / `GenFuture` shim.

The primary motivation for this change was hiding this implementation
detail in stack traces and debuginfo, but it can in theory also help
the optimizer as there is less abstractions to see through.
2022-11-24 10:04:27 +01:00
flip1995
cd0bb7de01 Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyup 2022-10-23 15:18:45 +02:00
Philipp Krones
98bf99e2f8 Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup 2022-09-09 13:36:26 +02:00
bors
ce339b219a Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillot
`BindingAnnotation` refactor

* `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`)
* `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)`
* Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}`

One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`.

I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-06 03:16:29 +00:00
Takayuki Maeda
4bcaddeeb2 separate the receiver from arguments in HIR under /clippy 2022-09-05 22:25:57 +09:00
Cameron Steffen
e5f30f4dfa clippy: BindingAnnotation change 2022-09-02 13:03:11 -05:00
Cameron Steffen
82f613ee3b Remove a span from hir::ExprKind::MethodCall 2022-01-21 07:48:10 -06:00
lcnr
d5cbae90f9 fix clippy 2021-12-23 11:17:03 +01:00
Cormac Relf
17c1ff9faa let-else: use hir::Let in clippy
fix clippy format using `cargo fmt -p clippy_{lints,utils}`
manually revert rustfmt line truncations
rename to hir::Let in clippy
Undo the shadowing of various `expr` variables after renaming `scrutinee`
reduce destructuring of hir::Let to avoid `expr` collisions
cargo fmt -p clippy_{lints,utils}
bless new clippy::author output
2021-12-13 14:02:41 +11:00
flip1995
8fea1d94f3 Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup 2021-12-06 12:33:31 +01:00
Cameron Steffen
e58ffb88e6 Fix Clippy with changed for loop desugar 2021-11-21 08:16:09 -06:00
Caio
b97d4c062b Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
flip1995
2b20f49841 Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup 2021-07-29 12:16:06 +02:00
Caio
7d42172899 Reintroduce hir::ExprKind::If 2021-01-07 18:54:12 -03:00
David Wood
f13d2bfd9b clippy: support QPath::LangItem
This commit updates clippy with the introduction of `QPath::LangItem` so
that it still compiles.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-17 13:55:05 +01:00
flip1995
a640696cdf
Rustup to rust-lang/rust#69506 2020-03-04 00:56:43 +01:00
Lzu Tao
652666b288 rustup "Add span information to ExprKind::Assign" 2019-12-24 11:25:24 +07:00
Lzu Tao
d1ca5f1d7c rustup "Merge ast::Mutability and mir::Mutability" 2019-12-21 18:38:45 +00:00
Manish Goregaokar
341e266508 Add BorrowKind::Ref 2019-11-27 14:39:28 -08:00
flip1995
d43c424145
Rustup to rust-lang/rust#66671 2019-11-25 13:18:38 +01:00
Manish Goregaokar
e9a3e54910 MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy 2019-11-11 10:58:39 -08:00
flip1995
b67dfb4896
Move author issue test to author subdir 2019-09-27 18:07:07 +02:00
flip1995
8d8ba14371
Fix author lint 2019-09-27 18:01:04 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813 2019-09-27 17:21:20 +02:00
Manish Goregaokar
982c51e769 arm.pats -> arm.pat 2019-09-25 12:52:16 -07:00
flip1995
0fc8eaf294
Remove empty *.std{err,out} files 2019-08-26 10:22:34 +02:00
flip1995
87fa2d90f5
Rustup to rust-lang/rust#62984
Lint redundant_semicolon was added to rustc
2019-08-15 10:14:06 +02:00
Oliver Scherer
3908d86f8a
Don't rustfmt author test
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-05-28 15:34:25 +02:00
Oliver Scherer
f98e4bd33b
Fix Block dump in author lint 2019-05-28 13:01:11 +02:00
Andy Russell
effea41fe4
tweak let_and_return diagnostic
Label the unnecessary let binding and convert the note to structured
suggestion.
2019-05-24 14:52:55 -04:00
Manish Goregaokar
19cfb84405 Start handling desugarings in author lint 2019-05-10 23:43:58 -07:00
Matthias Krüger
f195680edb more Use->DropTemps fixes 2019-05-01 23:04:35 +02:00
Michael Wright
5ad79c2b3d Fix breakage due to rust-lang/rust#60225 2019-04-28 09:11:20 +02:00
rchaser53
ae787d954e fix missing a semicolon 2019-03-07 23:26:47 +09:00
Michael Wright
f51f0178dd Fixed breakage due to rust-lang/rust#57489 2019-01-20 12:21:30 +02:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00
flip1995
d2dbd0b8a5
Update *.stderr files 2018-12-28 12:41:12 +01:00
Matthias Krüger
7bcc2cd9c8 update test stderr 2018-12-10 08:22:07 +01:00
Matthias Krüger
435299be30 rustfmt tests 2018-12-09 23:26:16 +01:00
Owen Sanchez
456843f1cd Swap order of methods in needless_range_loop suggestion in some cases 2018-10-14 20:14:16 -07:00
Manish Goregaokar
e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
flip1995
e9af09c274 Adapt the *.stderr files of the ui-tests to the tool_lints 2018-08-29 11:08:29 -07:00
flip1995
37099ae034
Remove now stable tool_attributes feature 2018-08-23 15:36:07 +02:00
Alex Crichton
8ef759e027 Fix fallout from rust-lang/rust#52841 2018-08-02 18:08:22 -07:00
csmoe
8e929946fd DeclKind 2018-07-16 11:48:33 +02:00
csmoe
8cf463fe93 StmtKind 2018-07-16 11:48:33 +02:00
csmoe
1bd17e4fa2 ExprKind 2018-07-16 11:46:37 +02:00
Andrea Lattuada
5db444dfed author tests: update for_loop.stdout file 2018-05-28 14:50:41 +02:00