Matthias Krüger
21a6f0ce87
Rollup merge of #122780 - GuillaumeGomez:rename-hir-local, r=oli-obk
...
Rename `hir::Local` into `hir::LetStmt`
Follow-up of #122776 .
As discussed on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Improve.20naming.20of.20.60ExprKind.3A.3ALet.60.3F ).
I made this change into a separate PR because I'm less sure about this change as is. For example, we have `visit_local` and `LocalSource` items. Is it fine to keep these two as is (I supposed it is but I prefer to ask) or not? Having `Node::Local(LetStmt)` makes things more explicit but is it going too far?
r? ```@oli-obk```
2024-03-23 15:00:18 +01:00
Guillaume Gomez
43a61e9aca
Rename hir::Node::Local
into hir::Node::LetStmt
2024-03-22 20:48:36 +01:00
Michael Goulet
f9ad628acd
And the tools too
2024-03-22 11:13:29 -04:00
Michael Goulet
c92b350581
Programmatically convert some of the pat ctors
2024-03-22 11:13:29 -04:00
Philipp Krones
0e62b18435
Merge commit '9d6f41691ed9dbfaec2a2df2661c42451f2fe0d3' into clippy-subtree-update
2024-03-21 22:20:40 +01:00
Philipp Krones
7e83df4068
Merge commit '93f0a9a91f58c9b2153868f458402155fb6265bb' into clippy-subtree-update
2024-03-07 17:19:29 +01:00
Nicholas Nethercote
2a2b0b78eb
Rename DiagnosticBuilder
as Diag
.
...
Much better!
Note that this involves renaming (and updating the value of)
`DIAGNOSTIC_BUILDER` in clippy.
2024-02-28 08:55:35 +11:00
Philipp Krones
7be6e2178e
Merge commit '10136170fe9ed01e46aeb4f4479175b79eb0e3c7' into clippy-subtree-update
2024-02-27 15:50:17 +01:00
Nicholas Nethercote
a16dbd7339
Prefer DiagnosticBuilder
over Diagnostic
in diagnostic modifiers.
...
There are lots of functions that modify a diagnostic. This can be via a
`&mut Diagnostic` or a `&mut DiagnosticBuilder`, because the latter type
wraps the former and impls `DerefMut`.
This commit converts all the `&mut Diagnostic` occurrences to `&mut
DiagnosticBuilder`. This is a step towards greatly simplifying
`Diagnostic`. Some of the relevant function are made generic, because
they deal with both errors and warnings. No function bodies are changed,
because all the modifier methods are available on both `Diagnostic` and
`DiagnosticBuilder`.
2024-02-19 20:23:20 +11:00
Vadim Petrochenkov
fc8f6628ab
hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}
2024-02-10 12:24:46 +03:00
Philipp Krones
f3b3d23416
Merge commit '60cb29c5e4f9772685c9873752196725c946a849' into clippyup
2024-02-08 20:24:42 +01:00
Vadim Petrochenkov
b247f41596
hir: Remove fn opt_hir_id
and fn opt_span
2024-02-07 09:38:24 +03:00
Josh Stone
eb42f3e703
Pack the u128 in LitKind::Int
2024-01-19 20:10:39 -08:00
Philipp Krones
aa220c7ee7
Merge commit '26ac6aab023393c94edf42f38f6ad31196009643'
2024-01-11 17:27:03 +01:00
Vadim Petrochenkov
e10a05dff3
rustc_span: Optimize syntax context comparisons
...
Including comparisons with root context
2024-01-06 01:25:20 +03:00
Philipp Krones
3596d44988
Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyup
2023-12-16 14:12:50 +01:00
Matthias Krüger
f90e8ef6b8
Rollup merge of #118888 - compiler-errors:uplift-more-things, r=jackh726
...
Uplift `TypeAndMut` and `ClosureKind` to `rustc_type_ir`
Uplifts `TypeAndMut` and `ClosureKind`
I know I said I was just going to get rid of `TypeAndMut` (https://github.com/rust-lang/types-team/issues/124 ) but I think this is much simpler, lol
r? `@jackh726` or `@lcnr`
2023-12-15 06:50:18 +01:00
Michael Goulet
20de341bb0
Uplift TypeAndMut
2023-12-12 23:24:44 +00:00
zetanumbers
fe37cc1d97
Move some methods from tcx.hir()
to tcx
...
Renamings:
- find -> opt_hir_node
- get -> hir_node
- find_by_def_id -> opt_hir_node_by_def_id
- get_by_def_id -> hir_node_by_def_id
Fix rebase changes using removed methods
Use `tcx.hir_node_by_def_id()` whenever possible in compiler
Fix clippy errors
Fix compiler
Apply suggestions from code review
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Add FIXME for `tcx.hir()` returned type about its removal
Simplify with with `tcx.hir_node_by_def_id`
2023-12-12 06:40:29 -08:00
Philipp Krones
c9a43b18f1
Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-sync
2023-12-01 18:21:58 +01:00
Philipp Krones
6246f0446a
Merge commit 'edb720b199083f4107b858a8761648065bf38d86' into clippyup
2023-11-16 19:13:24 +01:00
Philipp Krones
77c1e3aaa1
Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup
2023-11-02 17:35:56 +01:00
Jason Newcomb
9de3e6c928
Add more diagnostic items for clippy
2023-10-05 18:21:47 -04:00
Philipp Krones
772296c50e
Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyup
2023-09-25 11:28:58 +02:00
Philipp Krones
cc61aeea54
Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyup
2023-08-24 21:32:12 +02:00
Philipp Krones
f730a2655a
Merge commit '1e8fdf492808a25d78a97e1242b835ace9924e4d' into clippyup
2023-08-11 14:05:13 +02:00
Philipp Krones
b0e64a9c09
Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyup
2023-07-31 23:53:53 +02:00
Philipp Krones
d6d530fd0b
Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyup
2023-07-17 10:22:32 +02:00
Mahdi Dibaiee
fdb2e363d3
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Philipp Krones
cb3ecf7b79
Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup
2023-07-02 14:59:02 +02:00
Philipp Krones
e6dc0efc00
Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup
2023-06-02 11:41:57 +02:00
Urgau
1a5db18b11
Drop uplifted clippy::cast_ref_to_mut
2023-05-31 13:42:53 +02:00
Philipp Krones
b76b0aeb63
Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup
2023-05-20 15:39:26 +02:00
Philipp Krones
7e9abb311d
Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup
2023-05-05 17:45:49 +02:00
Philipp Krones
a1b75c5108
Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup
2023-04-23 13:28:56 +02:00
Philipp Krones
6b95029f17
Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyup
2023-04-11 15:31:08 +02:00
Philipp Krones
cf8a67d9ad
Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyup
2023-03-10 10:53:50 +01:00
Jason Newcomb
0413fb35ba
Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyup
2023-02-25 19:28:50 -05:00
Kyle Matsuda
98c4a49db8
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
2023-02-16 17:05:56 -07:00
Kyle Matsuda
f0565c939e
change usages of type_of to bound_type_of
2023-02-16 17:01:52 -07:00
Philipp Krones
5c7a65251a
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
2023-01-27 21:09:08 +01: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 Goulet
bd1d8971cf
rename find_parent_node to opt_parent_id
2023-01-04 00:43:13 +00:00
Philipp Krones
4ccafea92d
Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyup
2022-12-29 14:28:34 +01:00
Philipp Krones
1c422524c7
Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup
2022-12-17 14:12:54 +01:00
Philipp Krones
d05e2865a0
Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup
2022-12-01 18:29:38 +01:00
hkalbasi
0aaea40eb2
move some layout logic to rustc_target::abi::layout
2022-11-24 16:26:12 +03:30
Philipp Krones
46c5a5d234
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
2022-11-21 20:51:52 +01:00
Maybe Waffle
471d855a8e
Update tooling
2022-10-27 18:41:26 +04:00