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.
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
Simple postfix macros #2442
base: master
Are you sure you want to change the base?
Simple postfix macros #2442
Changes from 32 commits
684fae5
86c29a3
bdf9e41
e35414c
423237e
b4544df
b0605db
221de8e
0ebe83e
24999bb
dac0943
cd18fc9
81e1e8d
be68f24
f32688f
c9cb3be
fcf7a57
68d7673
3e99287
f2d4bd0
07c26b6
21cd66c
4467a5e
e0cb6bc
d966d41
293e8d6
df0b8f7
82da7f9
446b802
32ba75f
5711eca
c13ba49
731dbc6
a409770
37b333d
0194091
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I can say with confidence that there is no support for this in T-types.
Furthermore we don't have the infrastructure in the compiler for supporting this, and are not expecting this to be possible within the next 5-10 years. There is some serious reengineering required to get there, and the incremental steps required for it have stalled two years ago.
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.
edit: wrong text section highlighted, so read the comment as a free comment
I think this RFC needs to be evaluated on the basis that such a system will never come to Rust, as that is the likeliest situation we'll find ourselves in afaict.
If this RFC is only accepted because it leaves the door open to a future type based extension, then it should not be accepted imo.
If this section causes opponents of the RFC to accept the RFC as a compromise, because a type based system is expected to come in the future, then this should be rediscussed.
Imo this RFC should explicitly state that we will never get a type based system, and include T-types in the FCP.
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.
Why can't we just use
&$self
as an expression and have that evaluate to the tokens that were passed as theself
? Just like with other arguments, if you don't want it evaluated twice, first evaluate it into a let binding, then use that twice.