bors
b44197abb0
Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, r=cjgillot
...
Separate the receiver from arguments in HIR
Related to #100232
cc `@cjgillot`
2022-09-05 16:21:40 +00:00
Takayuki Maeda
9cde34e180
use propagate_through_exprs
instead of propagate_through_expr
...
fix `ExprKind` static_assert_size
fix hir-stats
2022-09-05 23:11:34 +09:00
bors
2dc703fd6e
Auto merge of #101228 - nnethercote:simplify-hir-PathSegment, r=petrochenkov
...
Simplify `hir::PathSegment`
r? `@petrochenkov`
2022-09-05 13:36:54 +00:00
Takayuki Maeda
fea1c5f5c8
refactor: remove unnecessary variables
2022-09-05 22:31:02 +09:00
Takayuki Maeda
87c6da363f
separate the receiver from arguments in HIR
2022-09-05 22:25:49 +09:00
Dylan DPC
75e7bb842a
Rollup merge of #101420 - kraktus:doc_hir_local, r=cjgillot
...
Fix `hir::Local` doc to match with the variable name used: `init`
2022-09-05 14:15:54 +05:30
Nicholas Nethercote
08a00eb0da
Address review comments.
2022-09-05 14:20:29 +10:00
Nicholas Nethercote
bb0ae3c446
Make hir::PathSegment::hir_id
non-optional.
2022-09-05 14:20:25 +10:00
Nicholas Nethercote
6d850d936b
Make hir::PathSegment::res
non-optional.
2022-09-05 14:20:25 +10:00
kraktus
e1bb09edff
Fix hir::Local
doc to match with the variable name used: init
2022-09-04 21:46:28 +02:00
Nicholas Nethercote
0a52fbe536
Rename GenericArg::id
as GenericArg::hir_id
.
...
Because `hir_id` is the standard name for methods that return a `HirId`
from a HIR node.
2022-08-29 14:16:49 +10:00
Nicholas Nethercote
22379bd9db
Use &'hir Mod
everywhere.
...
For consistency, and because it makes HIR measurement simpler and more
accurate.
2022-08-29 06:35:14 +10:00
Nicholas Nethercote
a847d5e4ce
Use &'hir Ty
everywhere.
...
For consistency, and because it makes HIR measurement simpler and more
accurate.
2022-08-29 06:35:14 +10:00
Nicholas Nethercote
db35b685a7
Use &'hir Expr
everywhere.
...
For consistency, and because it makes HIR measurement simpler and more
accurate.
2022-08-29 06:35:14 +10:00
Nicholas Nethercote
854219d2ad
Expand the HIR (and AST) size assertions.
2022-08-29 06:35:14 +10:00
Camille GILLOT
20012ea4eb
Merge implementations of HIR fn_decl and fn_sig.
2022-08-26 21:38:20 +02:00
Dylan DPC
2e78db3858
Rollup merge of #100610 - nnethercote:ast-and-parser-tweaks, r=spastorino
...
Ast and parser tweaks
r? `@spastorino`
2022-08-16 18:16:13 +05:30
bors
ef9810a3e2
Auto merge of #100237 - cjgillot:no-special-hash-hir, r=nagisa
...
Remove manual implementations of HashStable for hir::Expr and hir::Ty.
We do not need to force hashing HIR bodies inside those nodes. The contents of bodies are not accessible from the `hir_owner` query which used `hash_without_bodies`. When the content of a body is required, the access is still done using `hir_owner_nodes`, which continues hashing HIR bodies.
2022-08-16 02:32:47 +00:00
Nicholas Nethercote
3e04fed6fa
Remove {ast,hir}::WhereEqPredicate::id
.
...
These fields are unused.
2022-08-16 12:13:23 +10:00
Eric Huss
b651c1cebe
Check attributes on struct expression fields.
...
Attributes on struct expression fields were not being checked for
validity. This adds the fields as HIR nodes so that `CheckAttrVisitor`
can visit those nodes to check their attributes.
2022-08-11 21:48:39 -07:00
Eric Huss
1b464c73b7
Check attributes on pattern fields.
...
Attributes on pattern struct fields were not being checked for validity.
This adds the fields as HIR nodes so that the `CheckAttrVisitor` can
visit those nodes to check their attributes.
2022-08-11 21:48:39 -07:00
Nicholas Nethercote
574ba831d4
Avoid repeating qualifiers on static_assert_size
calls.
...
Some of these don't need a `use` statement because there is already a
`#[macro_use] extern crate rustc_data_structures` item in the crate.
2022-08-10 11:51:21 +10:00
Camille GILLOT
8a4cbcf220
Derive HashStable for HIR Expr and Ty.
2022-08-07 17:30:45 +02:00
Camille GILLOT
110f0656cb
Store associated item defaultness in impl_defaultness.
2022-08-01 21:38:16 +02:00
Nicholas Nethercote
9037ebba0c
Improve size assertions.
...
- For any file with four or more size assertions, move them into a
separate module (as is already done for `hir.rs`).
- Add some more for AST nodes and THIR nodes.
- Put the `hir.rs` ones in alphabetical order.
2022-08-01 09:15:05 +10:00
Camille GILLOT
10be0dd8df
Replace LifetimeRes::Anonymous by LifetimeRes::Infer.
2022-07-26 19:00:31 +02:00
Camille GILLOT
ab63591f00
Remove the distinction between LifetimeName::Implicit and LifetimeName::Underscore.
2022-07-26 19:00:31 +02:00
Michael Goulet
3eef023da0
Address more nits
2022-07-21 16:43:10 +00:00
Michael Goulet
99c32570bb
Do if-expression obligation stuff less eagerly
2022-07-21 07:39:28 +00:00
Dylan DPC
24f0e1499e
Rollup merge of #99119 - TaKO8Ki:remove-string-matching-about-methods, r=cjgillot
...
Refactor: remove a string matching about methods
This patch remove a string matching about methods and adds some rustfix tests.
2022-07-15 15:53:38 +05:30
Takayuki Maeda
45b88aff10
simplify suggest_deref_ref_or_into
2022-07-15 14:29:15 +09:00
Dylan DPC
e5a86d7358
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
d2923b4007
Add back expr size checks
2022-07-12 21:00:13 +04:00
Maybe Waffle
df4fee9841
Add an indirection for closures in hir::ExprKind
...
This helps bring `hir::Expr` size down, `Closure` was the biggest
variant, especially after `for<>` additions.
2022-07-12 21:00:13 +04:00
Maybe Waffle
c2dbd62c7c
Lower closure binders to hir & properly check them
2022-07-12 21:00:03 +04:00
Maybe Waffle
f89ef3cf66
Comment out expr size check
2022-07-12 16:26:08 +04:00
Ding Xiang Fei
5374688e1d
add tests for async await
2022-07-11 23:20:39 +02:00
Ding Xiang Fei
1cd30e7b32
move else block into the Local
struct
2022-07-11 23:20:37 +02:00
Ding Xiang Fei
6c529ded86
lower let-else in MIR instead
2022-07-11 23:20:36 +02:00
Dylan DPC
6497130baa
Rollup merge of #99043 - compiler-errors:derive-nit, r=cjgillot
...
Collapse some weirdly-wrapping derives
self-explanatory
2022-07-09 11:28:07 +05:30
Michael Goulet
69ac8a68af
Collapse some weirdly-wrapping derives
2022-07-08 04:36:30 +00:00
Michael Goulet
ff9fd36aa4
Implement IntoDiagnosticArg for hir::ConstContext
2022-07-08 03:47:31 +00:00
Cameron Steffen
ec82bc1996
Factor out hir::Node::Binding
2022-07-01 10:04:19 -05:00
Camille GILLOT
7437136f0e
Use CreateParameter mode for closures too.
2022-06-21 21:13:43 +02:00
Yuki Okushi
87e373e82f
Rollup merge of #98110 - cjgillot:closure-brace, r=Aaron1011
...
Make `ExprKind::Closure` a struct variant.
Simple refactor since we both need it to introduce additional fields in `ExprKind::Closure`.
r? ``@Aaron1011``
2022-06-15 19:37:14 +09:00
Michael Goulet
5f7474e6dc
Address comments
2022-06-11 16:38:48 -07:00
Michael Goulet
9c47afe9fa
Handle empty where-clause better
2022-06-11 16:27:01 -07:00
Camille GILLOT
3039cfeb6a
Make ExprKind::Closure
a struct variant.
2022-06-12 00:16:27 +02:00
kyoto7250
3685a1e9d2
feat(fix): update some links
2022-06-11 23:19:58 +09:00
Michael Goulet
2ae1ec9119
Don't suggest adding let in certain if conditions
2022-06-07 21:02:58 -07:00