-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Move trait prototype
#161457
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
Draft
zannabianca1997
wants to merge
25
commits into
rust-lang:main
Choose a base branch
from
zannabianca1997:move-trait
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Move trait prototype
#161457
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
cc87a4e
fallible type ops
nia-e 2a3042b
move trait
nia-e bde0cb3
Fix: removed Move from being printed at all
zannabianca1997 f5a5e65
Fix: assume Move when the `move_trait` feature is not added
zannabianca1997 acbf9e8
Fix: preferred printing of `?Move` instead of `Move`
zannabianca1997 f028f7b
Feat: removed Move from mangled symbols
zannabianca1997 d319d8e
Feat: mangling of `?Move` bounds
zannabianca1997 ab882e1
Fix: legacy mangler (Fn printer)
zannabianca1997 b2cb667
Fix: normalized test
zannabianca1997 e5b038d
Fix: correctly refusing trait objects that have only Move as a bound
zannabianca1997 ed155b9
Fix: line number drift
zannabianca1997 b22746a
Fix: missing Move pattern
zannabianca1997 eda1c34
Fix: removed the move clause from explicit clauses when the feature is
zannabianca1997 6d17593
Cleanup
zannabianca1997 dc150f7
Fix: expanded boolean into a more comprehensible enum
zannabianca1997 b1dec32
aligned to boolean values
zannabianca1997 6bcca4c
Fix: helper to avoid repeating printing pattern
zannabianca1997 b70a71b
Fix: missing prints
zannabianca1997 830a27b
reborrow! yay.
zannabianca1997 5e5cb73
Fix: documented error in feature gate test
zannabianca1997 19397e8
Fix: documented test being fixed under the next solver
zannabianca1997 309e68d
Chore: new test use the debug too
zannabianca1997 c51c5c0
Giving up for now on aligning winnowing of Move to Sized
zannabianca1997 2df83aa
Revert "Fix: removed the move clause from explicit clauses when the f…
zannabianca1997 c372a25
Fix: addressed fixme
zannabianca1997 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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,19 +55,13 @@ fn associated_type_bounds<'tcx>( | |
| | PredicateFilter::SelfTraitThatDefines(_) | ||
| | PredicateFilter::SelfAndAssociatedTypeBounds => { | ||
| // Implicit bounds are added to associated types unless a `?Trait` bound is found. | ||
| icx.lowerer().add_implicit_sizedness_bounds( | ||
| &mut bounds, | ||
| item_ty, | ||
| hir_bounds, | ||
| ImpliedBoundsContext::AssociatedTypeOrImplTrait, | ||
| span, | ||
| ); | ||
| icx.lowerer().add_default_traits( | ||
| icx.lowerer().add_implicit_bounds( | ||
| &mut bounds, | ||
| item_ty, | ||
| hir_bounds, | ||
| ImpliedBoundsContext::AssociatedTypeOrImplTrait, | ||
| span, | ||
| true, | ||
| ); | ||
|
|
||
| // Also collect `where Self::Assoc: Trait` from the parent trait's where clauses. | ||
|
|
@@ -382,19 +376,13 @@ fn opaque_type_bounds<'tcx>( | |
| | PredicateFilter::SelfOnly | ||
| | PredicateFilter::SelfTraitThatDefines(_) | ||
| | PredicateFilter::SelfAndAssociatedTypeBounds => { | ||
| icx.lowerer().add_implicit_sizedness_bounds( | ||
| &mut bounds, | ||
| item_ty, | ||
| hir_bounds, | ||
| ImpliedBoundsContext::AssociatedTypeOrImplTrait, | ||
| span, | ||
| ); | ||
| icx.lowerer().add_default_traits( | ||
| icx.lowerer().add_implicit_bounds( | ||
| &mut bounds, | ||
| item_ty, | ||
| hir_bounds, | ||
| ImpliedBoundsContext::AssociatedTypeOrImplTrait, | ||
| span, | ||
| true, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that |
||
| ); | ||
| } | ||
| //`ConstIfConst` is only interested in `[const]` bounds. | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for perf reasons, it might actually be faster to do
might be worth another perf run with that change 😁
View changes since the review