-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Copy generics from functions to Return Position Impl Traits in HIR lowering #101345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
7bbe7b6
Set up new approach for impl trait in return position
spastorino b3cc702
Make RPIT not inherit generics from its function
spastorino bae1deb
Call mk_param_from_def for all params
spastorino a5f8780
Copy generic parameters from function to impl trait opaque type
spastorino c1f8fbd
Test nested impl trait in return position
spastorino 2cccbc4
Add generic type and const args to OpaqueDef
spastorino bb28711
Handle all kind of generic args when converting to ty
spastorino f60f609
param_env def_id is the one of the opaque type for RPIT
spastorino a71699d
Properly gather explicit predicates of opaque type
spastorino a311717
is_impl_trait_defn doesn't have any effect now with RPIT
spastorino 4642ec9
register_member_constraints is 0 for RPIT
spastorino 35a98a7
gather_explicit_predicates_of return empty for OpaqueTyOrigin::AsyncFn
spastorino fee7dc6
Properly type check type parameter predicates for RPIT
spastorino df9356d
Properly handle Const generics
spastorino 79eeffa
Pass Generics to lower impl trait instead of generic params
spastorino d102712
Copy generic param bounds and where clauses from function to RPIT
spastorino 8d26963
Remap on lower_res
spastorino a08ff68
Lower lifetime bounds/predicates as static if not part of RPIT bounds
spastorino cce5412
Add APIT test for RPIT v2
spastorino 3b4ab9d
Add bounds regression test for RPIT v2
spastorino be33fa2
Add generic associated type test for RPIT v2
spastorino c67ab47
Add where bounds test for RPIT v2
spastorino 064675d
Lower APIT generics to RPIT
spastorino 50bc776
Copy generic params from outer impl/trait blocks to RPIT
spastorino 8f20d42
Add debug call on rustc_middle generics
spastorino 98d43e5
Supress warn on artificial static lifetimes for RPIT
spastorino cfa73f8
instrument type param predicates and bounds in generic fns
spastorino 9118087
Add APIT with lifetimes test
spastorino 3049a8d
Add a simple APIT test
spastorino 8b5c082
Add lifetimes bounds test
spastorino 1563a66
Do not assert impl_trait_* is_empty
spastorino 54d5fa4
Add debug information
spastorino faafdf1
Add APIT anonymous lifetime test
spastorino fff4d31
Add trait bound anonymous lifetime test
spastorino f08f19e
Create definitions and remap lifetimes in lower_lifetime_binder
spastorino 697393f
save/restore the node-id table for poly-trait-ref
spastorino 9f8a343
impl/block types are first and then fn types
spastorino f514607
Remove return_position_impl_trait_v2 feature flag and make it default
spastorino 25bbe2a
Remove reborrow in favor of passing &mut
spastorino bab1d54
Pass generics info from context down to the inner rpits on async fns
spastorino a19d07e
Push apit nodes before lowering generics and bounds
spastorino 679293a
Do not create new defs and remaps when lowering Universal inside RPITs
spastorino be98207
Only create def and remap on lower_lifetime_binder for RPITs and not …
spastorino f16d7fe
Ignore where-clauses wf checks for RPITs they are kinda bogus
spastorino 7200539
Bless impl-trait-captures test as the output is better now
spastorino a4356ee
Bless async test
spastorino 0791f8d
Bless bound-normalization-fail test
spastorino 8d53dc7
Avoid unneeded repeated code
spastorino 49d057f
itertools is not needed anymore in rustc_ast_lowering
spastorino 0fadeed
Add debug_asserts back
spastorino 835d7de
call lower_span before adding it to GenericArg::Type
spastorino 971641f
Move itctx creation to outside loop
spastorino d45f1d3
Extend Rustdocs of lower_lifetime_binder
spastorino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.