Santiago Pastorino
f6b4dd1541
Create new_mapping local structure and avoid checking def_ids on captures
2022-08-04 11:26:56 -03:00
Santiago Pastorino
6c6a81e48e
Remove binders_to_ignore from LifetimeCaptureContext
2022-08-04 11:26:56 -03:00
Santiago Pastorino
95158fdf3a
No need to store parent_def_id in LifetimeCaptureContext
2022-08-04 11:26:56 -03:00
Santiago Pastorino
552f6b0f81
No need to check binders to ignore on new_named_lifetime_with_res's LifetimeRes::Fresh
2022-08-04 11:26:56 -03:00
Santiago Pastorino
6041ed0775
No need to check binders to ignore on new_named_lifetime_with_res's LifetimeRes::Param
2022-08-04 11:26:55 -03:00
Santiago Pastorino
d9e6364755
new_named_lifetime_with_res's LifetimeRes::Fresh should have created def_id already
2022-08-04 11:26:55 -03:00
Santiago Pastorino
3030ab3074
new_named_lifetime_with_res's LifetimeRes::Param should have created def_id already
2022-08-04 11:26:55 -03:00
Santiago Pastorino
14ea17858d
Fail if LifetimeRes is Infer when creating def ids for lifetimes copies
2022-08-04 11:26:55 -03:00
Santiago Pastorino
1802d45b12
Record RPITs elided lifetimes in path segments
2022-08-04 11:26:54 -03:00
Santiago Pastorino
05b989e16e
Skip lifetimes in binders when visiting
2022-08-04 11:26:54 -03:00
Santiago Pastorino
4f334f2b97
Move LifetimeCollectVisitor to rustc_ast_lowering
2022-08-04 11:26:54 -03:00
Santiago Pastorino
9f77688d17
Completely remove captures flag
2022-08-04 11:26:53 -03:00
Santiago Pastorino
20c88a2a30
Do not execute captures code when lowering lifetimes as GenericArg
2022-08-04 11:26:53 -03:00
Santiago Pastorino
9c0d9babd1
Do not execute captures code for async fns
2022-08-04 11:26:53 -03:00
Santiago Pastorino
5a184acfc6
There's no need to check binders_to_ignore using the old code anymore
2022-08-04 11:26:53 -03:00
Santiago Pastorino
19dcbd151b
Explicitly gather lifetimes and definitions for bare async fns
2022-08-04 11:26:52 -03:00
Santiago Pastorino
25825cd4fa
Extract create_and_capture_lifetime_defs function
2022-08-04 11:26:52 -03:00
Santiago Pastorino
fac763168f
Remove NEW_COLLECT_LIFETIMES env var
2022-08-04 11:26:52 -03:00
Santiago Pastorino
399609e841
Add debug! calls
2022-08-04 11:26:52 -03:00
Santiago Pastorino
cda2c04592
Explicitly gather lifetimes and definitions in RPIT
2022-08-04 11:26:51 -03:00
Santiago Pastorino
84a24a1b3c
Unroll while_capturing_lifetimes into lower_opaque_impl_trait
2022-08-04 11:26:51 -03:00
Santiago Pastorino
0f11a0cd24
Add captures flag to capture or not while lowering
2022-08-04 11:26:51 -03:00
Santiago Pastorino
b14c9571fa
Make lower_generic_bound_predicate receive AST bounds instead of HIR bounds
2022-08-04 11:26:51 -03:00
Santiago Pastorino
5c23a2e5a6
Remove old docs on lower_async_fn_ret_ty
2022-08-04 11:26:50 -03: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
Camille GILLOT
3c5048d2ec
Report elision failures on the AST.
2022-07-25 19:19:23 +02:00
Caio
3266460749
Stabilize let_chains
2022-07-16 20:17:58 -03:00
Joshua Nelson
3c9765cff1
Rename debugging_opts to unstable_opts
...
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
2022-07-13 17:47:06 -05: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
bors
38b72154de
Auto merge of #98637 - cjgillot:bare-trait-anon-lt, r=petrochenkov
...
Create fresh lifetime parameters for bare fn trait too
The current code fails to account for the equivalence between `dyn FnMut(&mut u8)` and bare `FnMut(&mut u8)`, and treated them differently.
This PR introduces a special case for `Fn` traits, which are always fully resolved.
Fixes #98616
Fixes #98726
This will require a beta-backport, as beta contains that bug.
r? `@petrochenkov`
2022-07-11 17:09:37 +00:00
Camille GILLOT
8fc3deb1b4
Remove sess field from LoweringContext.
2022-07-06 23:15:57 +02:00
Camille GILLOT
74be945820
Expand comment in with_hir_id_owner.
2022-07-06 23:15:11 +02:00
Camille GILLOT
682f57656e
Do not create a new NodeId when not used.
2022-07-06 23:10:36 +02:00
Camille GILLOT
fb060fb774
Remove useless branch.
2022-07-06 23:09:29 +02:00
Camille GILLOT
250c71b85d
Make AST lowering a query.
2022-07-06 23:04:55 +02:00
Camille GILLOT
21a12e8ab7
Handle fresh lifetimes on bare trait objects.
2022-07-02 09:21:55 +02:00
Camille GILLOT
32af719b07
Always create parameters for functions-like types.
2022-06-21 21:13:41 +02:00
Camille GILLOT
bc6a2c11ee
Leave the responsibility to create Fresh lifetimes to lowering.
2022-06-19 22:32:43 +02:00
bors
3a8b0144c8
Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoerister
...
Split up `Definitions` and `ResolverAstLowering`.
Split off https://github.com/rust-lang/rust/pull/95573
r? `@michaelwoerister`
2022-06-17 10:00:11 +00:00
Camille GILLOT
ae5959f4ba
Consume resolutions for lowering separately.
2022-06-15 19:42:43 +02:00
Camille GILLOT
8ffbd814af
Update next_node_id.
2022-06-15 19:41:41 +02:00
EdwinRy
c8b411ebf1
rename function and remove return type
2022-06-15 01:06:40 +01:00
Camille GILLOT
34e4d72929
Separate source_span and expn_that_defined from Definitions.
2022-06-14 22:45:51 +02:00
Camille GILLOT
b676edd641
Do not modify the resolver outputs.
2022-06-14 22:44:27 +02:00
Camille GILLOT
603746a35e
Make ResolverAstLowering a struct.
2022-06-14 22:44:27 +02: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
Santiago Pastorino
4ae69f8617
Extract lower_generic_and_bounds function
2022-06-07 18:29:07 -03:00