-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Replace TypeInfo::SelfType with a generic type parameter #4962
Merged
Conversation
This file contains 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
anton-trunov
force-pushed
the
anton-trunov/remove-self-type
branch
2 times, most recently
from
August 23, 2023 16:43
accbf4b
to
2cc62d0
Compare
anton-trunov
added
the
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
label
Aug 24, 2023
i.e. the following simple example type-checks: ``` contract; pub trait Trait { fn func(self) -> Self; } impl Trait for u64 { fn func(self) -> Self { 42 } } ```
by making its priority higher
…pe parameter (ONLY for enums, structs are waiting)
by expanding trait constraints for type parameters: these now also include supertraits as trait constraints
anton-trunov
force-pushed
the
anton-trunov/remove-self-type
branch
from
October 2, 2023 13:50
2cc62d0
to
50fc298
Compare
IGI-111
reviewed
Oct 2, 2023
IGI-111
previously approved these changes
Oct 2, 2023
JoshuaBatty
previously approved these changes
Oct 2, 2023
This was referenced Oct 3, 2023
JoshuaBatty
approved these changes
Oct 3, 2023
tritao
approved these changes
Oct 3, 2023
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
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.
Description
Fixes #4877
Tasks
Self
and the type-levelSelf
type parameter (related PR FixesSelf
not found in match statement. #4459):- [x] enums
- [x] structs (deferred as issue Resolve ambiguity between term/path-level
Self
and the type-levelSelf
type parameter for structs #5164)Self
for type constraintsoccurs_check
to prevent unification of a genericA
with a tuple(A, A)
;Self
type for blanket implementationsSelf
for associated constsshould_pass/language/eq_intrinsic
); blocking issues:- trait impl method resolution does not work inside intrinsics #5018
- Trait name resolution does not work properly in the presence of trait type arguments #5036
should_fail/generic_traits
testshould_pass/language/where_clause_impls
testshould_pass/language/name_resolution_inside_intrinsics
testimpl_trait.rs
should_pass/language/associated_type_container
testshould_pass/language/associated_type_method
testshould_pass/language/associated_type_and_associated_const
testshould_pass/language/associated_type_iterator
testChecklist
Breaking*
orNew Feature
labels where relevant.