-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add field representing types #146307
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
Open
BennoLossin
wants to merge
54
commits into
rust-lang:master
Choose a base branch
from
BennoLossin:field-projections
base: master
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.
+2,063
−305
Open
Add field representing types #146307
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
6e612c5
rustc_hir_typeck: match all ty kinds in probe
BennoLossin bc7a0bb
add field_projections feature gate
BennoLossin 1c26175
add field traits
BennoLossin 95eab26
error on manually implementing field traits
BennoLossin a88b108
add unaligned_field_offset intrinsic
BennoLossin c9d04aa
add builtin `field_of!` macro
BennoLossin 976272c
move `NoFieldOnType` error
BennoLossin 52eb6be
add `FieldPath`
BennoLossin 47c3417
use `FieldPath` in `offset_of!`
BennoLossin 17946a5
add FRTs to HIR
BennoLossin 36db825
add FRTs as `ty::Field`
BennoLossin af4f1e7
printing `ty::Field`
BennoLossin 2a9d9b2
FRTs are `Sized`
BennoLossin 51bac24
FRTs are uninhabited
BennoLossin 9ad7bf9
FRTs are not trivially `Copy` & `Clone`
BennoLossin eae060e
FRTs are trivially `Freeze`
BennoLossin 351f028
FRTs are not trivially `Unpin`
BennoLossin 36b21d9
FRTs don't implement `Drop`
BennoLossin b82b874
add coherence check for FRTs
BennoLossin 6c7ffa6
borrow check of FRTs (have no fields & can't be dereferenced)
BennoLossin bcf27f8
const eval of FRTs (they are uninhabited, so not really much to do)
BennoLossin 743de26
add FRTs to rustc_public
BennoLossin 014671d
FRTs & symbol names
BennoLossin fd8f344
FRTs & FFI
BennoLossin 7ef9323
rustdoc support for FRTs
BennoLossin 0bea467
add builtin impls of `Field` and `UnalignedField` for FRTs
BennoLossin 29db7da
add values for associated items of `UnalignedField`
BennoLossin 5e062b5
basic test
BennoLossin 92f733b
debuginfo for FRTs
BennoLossin 0e9e30a
fix test locations
BennoLossin 847000f
allow field types to implement copy
BennoLossin fe5608a
rustc_const_eval: improve error handling
BennoLossin adf8036
rustc_const_eval: explain `TooGeneric` error
BennoLossin 7547da8
remove fixme & use unreachable
BennoLossin 674f94a
partial enum & union support
BennoLossin 53fc6ad
make itemctxt structurally resolve field types
BennoLossin 07e6d0e
lower_field_path: don't query the type of the last field
BennoLossin 1ee4a9c
add cyclic test
BennoLossin 64b720e
fix typo
BennoLossin b568a77
add `-Znext-solver` versions to tests
BennoLossin 4a8f5c9
remove unaligned & unsized field support from lib & their lang items
BennoLossin 915e8b2
add next solver trait assembly
BennoLossin d0e2f9e
remove `impl Field` for fields of packed structs
BennoLossin c7aa957
fix visibilty check
BennoLossin cb15775
field path lowering, do check the field's type if the kind is OffsetOf
BennoLossin df3daf5
allow dead code in cyclic test
BennoLossin eee5536
fix codegen test
BennoLossin 5fe1380
fix clippy
BennoLossin acf2e31
remove re-export of `trait FieldPath`
BennoLossin f9d297f
make FRTs invariant
BennoLossin 807ae15
fix relation with invariance
BennoLossin b2cb269
rustc_type_ir: walk: remove resolved FIXME
BennoLossin e6a0420
add send test
BennoLossin 4f0462e
check for auto impls on field representing types
BennoLossin 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
Some comments aren't visible on the classic Files Changed page.
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
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
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.
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.
Since this is effectively a never type, why not group it with
Never
here?(I know nothing about debug info.^^)
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.
That will print
!
instead of the name of the FRT, maybe we want that, but maybe we don't?(I also don't know anything about debug info :)