bors
f19db28361
Auto merge of #10434 - Jarcho:snip_context, r=dswij
...
Remove `snippet_with_macro_callsite`
`snippet_with_context` is used instead to support nested macro calls.
changelog: None
2023-03-11 12:45:20 +00:00
Vadim Petrochenkov
79359cbbcf
rustc_middle: Remove trait DefIdTree
...
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-02 23:46:44 +04:00
Jason Newcomb
1a81a3e5cf
Remove snippet_with_macro_callsite
2023-03-02 00:51:04 -05:00
bors
0966f59c78
Auto merge of #108474 - Jarcho:clippyup, r=Manishearth
...
Update Clippy
Seems like `@flip1995` so this is a couple days late.
r? `@Manishearth`
2023-02-26 18:45:47 +00:00
Jason Newcomb
0413fb35ba
Merge commit ' 149392b0ba' into clippyup
2023-02-25 19:28:50 -05:00
Jason Newcomb
bc184e9c7d
Merge branch 'master' into rustup
2023-02-25 17:43:19 -05:00
Michael Goulet
9fd0a415bb
Make clippy happy
2023-02-25 19:46:36 +00:00
Samuel Tardieu
657ee48bec
Ignore instructions following a break from block in never_loop lint
...
It is not sufficient to ignore break from a block inside the loop.
Instructions after the break must be ignored, as they are unreachable.
This is also true for all instructions in outer blocks and loops
until the right block is reached.
2023-02-14 09:55:44 +01:00
Oli Scherer
e3a739a115
s/eval_usize/eval_target_usize/ for clarity
2023-02-14 08:51:19 +00:00
Samuel Tardieu
e9dffa3910
Fix a bug in never_loop when anonymous blocks are nested in named blocks
...
The following code
```
loop {
'a: {
{ }
break 'a;
}
}
```
was detected as a never-looping loop.
2023-02-14 09:23:04 +01:00
Samuel Tardieu
1fec2927c5
Replace combine_both by combine_seq
...
All evaluations now happen in order.
2023-02-13 22:34:05 +01:00
Samuel Tardieu
c231b41887
Remove useless call to combine_seq
...
`combine_seq(x, NeverLoopResult::Otherwise)` always returns `x`
2023-02-13 22:34:05 +01:00
Philipp Krones
e7fe1f9c14
Merge commit ' 0f7558148c' into clippyup
2023-02-10 14:01:19 +01:00
Philipp Krones
7c61b4ed89
Merge remote-tracking branch 'upstream/master' into rustup
2023-02-10 11:33:45 +01:00
Tyler Weaver
3b225e3a96
Update clippy_lints/src/loops/needless_range_loop.rs
...
Co-authored-by: Manish Goregaokar <manishsmail@gmail.com>
2023-01-30 09:59:26 -07:00
Tyler Weaver
4d266d31de
needless_range_loop: improve documentation
2023-01-29 11:41:53 -07:00
Kyle Matsuda
afb586fa1f
change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add EarlyBinder to fn_sig in metadata
2023-01-26 20:28:25 -07:00
Kyle Matsuda
38899d0c29
replace usages of fn_sig query with bound_fn_sig
2023-01-26 20:15:36 -07:00
Michael Woerister
465ed5bd46
Use UnordMap instead of FxHashMap in define_id_collections!().
2023-01-19 10:40:47 +01:00
Philipp Krones
d21616737b
Merge commit ' 7f27e2e74e' into clippyup
2023-01-12 19:48:13 +01:00
Michael Goulet
73d293fb6d
rename get_parent_node to parent_id
2023-01-04 00:43:13 +00:00
Philipp Krones
4ccafea92d
Merge commit ' 4f3ab69ea0' into clippyup
2022-12-29 14:28:34 +01:00
Philipp Krones
1c422524c7
Merge commit ' 4bdfb0741d' into clippyup
2022-12-17 14:12:54 +01:00
Philipp Krones
46c5a5d234
Merge commit ' f4850f7292' into clippyup
2022-11-21 20:51:52 +01:00
flip1995
cd0bb7de01
Merge commit ' 4f142aa105' into clippyup
2022-10-23 15:18:45 +02:00
lcnr
059e52b96b
rustc_hir_typeck: fix clippy
2022-10-20 17:53:14 +02:00
Maybe Waffle
7cfc6fa1f0
deprecate clippy::for_loops_over_fallibles
2022-10-09 13:07:21 +00:00
Cameron Steffen
6819e85501
Change InferCtxtBuilder from enter to build
2022-10-07 07:10:40 -05:00
Philipp Krones
d75b25faab
Merge commit ' ac0e10aa68' into clippyup
2022-10-06 09:44:38 +02:00
lcnr
e5ce6d18df
rustc_typeck to rustc_hir_analysis
2022-09-27 10:37:23 +02:00
Takayuki Maeda
ea75178219
separate definitions and HIR owners
...
fix a ui test
use `into`
fix clippy ui test
fix a run-make-fulldeps test
implement `IntoQueryParam<DefId>` for `OwnerId`
use `OwnerId` for more queries
change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24 23:21:19 +09:00
Philipp Krones
98bf99e2f8
Merge commit ' b52fb5234c' 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
Dylan DPC
9ae329232b
Rollup merge of #101142 - nnethercote:improve-hir-stats, r=davidtwco
...
Improve HIR stats
#100398 improve the AST stats collection done by `-Zhir-stats`. This PR does the same for HIR stats collection.
r? `@davidtwco`
2022-09-05 14:15:51 +05:30
Cameron Steffen
e5f30f4dfa
clippy: BindingAnnotation change
2022-09-02 13:03:11 -05:00
Jason Newcomb
fb41bfa774
Merge commit ' f51aade56f' into clippyup
2022-08-31 09:24:45 -04:00
Nicholas Nethercote
3b80e994d5
Use &'hir Expr everywhere.
...
For consistency, and because it makes HIR measurement simpler and more
accurate.
2022-08-29 06:35:14 +10:00
Philipp Krones
dc29cfb8d5
Merge commit ' 2b2190cb56' into clippyup
2022-08-11 19:42:16 +02:00
Philipp Krones
7d4daaa8fa
Merge commit ' fdb84cbfd2' into clippyup
2022-07-18 09:39:37 +02:00
Dylan DPC
e275abf92e
Rollup merge of #98705 - WaffleLapkin:closure_binder, r=cjgillot
...
Implement `for<>` lifetime binder for closures
This PR implements RFC 3216 ([TI](https://github.com/rust-lang/rust/issues/97362 )) and allows code like the following:
```rust
let _f = for<'a, 'b> |a: &'a A, b: &'b B| -> &'b C { b.c(a) };
// ^^^^^^^^^^^--- new!
```
cc ``@Aaron1011`` ``@cjgillot``
2022-07-14 14:14:21 +05:30
Maybe Waffle
1c3f62c750
Fix clippy build
2022-07-12 21:00:14 +04:00
Ding Xiang Fei
af3ba22313
move else block into the Local struct
2022-07-11 23:20:37 +02:00
Ding Xiang Fei
9225ebd786
lower let-else in MIR instead
2022-07-11 23:20:36 +02:00
Cameron Steffen
5de85902fa
Factor out hir::Node::Binding
2022-07-01 10:04:19 -05:00
Philipp Krones
09f5df5087
Merge commit ' 0cb0f76368' into clippyup
2022-06-30 10:50:09 +02:00
flip1995
f8f9d01c2a
Merge commit ' d7b5cbf065' into clippyup
2022-06-16 17:39:06 +02:00
Camille GILLOT
7b84a97c3e
Make ExprKind::Closure a struct variant.
2022-06-12 00:16:27 +02:00
Philipp Krones
f067783461
Merge commit ' d9ddce8a22' into clippyup
2022-06-04 13:34:07 +02:00
Ding Xiang Fei
2f250783b1
try to cache region_scope_tree as a query
2022-05-25 13:52:32 +08:00