Uh oh!
There was an error while loading. Please reload this page.
syntax: ABI-oblivious grammar - #65884
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
(The purpose of doing this is so that if we add a new ABI but forget to feature gate it, an ICE will occur and it won't pass CI.)
petrochenkov
commented
Oct 28, 2019
Assigning myself as well, I had some plans in this area. |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
07e5ff6 to
f8a588bCompareeddyb
commented
Oct 28, 2019
I think @oli-obk moved |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
nikomatsakis
commented
Oct 28, 2019
👍 from me |
Centril
commented
Oct 28, 2019
eddyb
commented
Oct 28, 2019
My argument would be that it's confusing to have two copies of the same type. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f66f4a1 to
9a46580Compare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
petrochenkov
commented
Oct 29, 2019
r=me after addressing the remaining comments, unless varkor wants to review as well. |
7e42b47 to
0997975CompareCentril
commented
Nov 6, 2019
@bors r=petrochenkov |
bors
commented
Nov 6, 2019
📌 Commit 09979759ba46574d39d8ab0c4dc14566b918e949 has been approved by |
This comment has been minimized.
This comment has been minimized.
We also sever syntax's dependency on rustc_target as a result. This should slightly improve pipe-lining. Moreover, some cleanup is done in related code.
0997975 to
55f76cdCompareCentril
commented
Nov 7, 2019
@bors r=petrochenkov |
bors
commented
Nov 7, 2019
📌 Commit 55f76cd has been approved by |
…chenkov syntax: ABI-oblivious grammar This PR has the following effects: 1. `extern $lit` is now legal where `$lit:literal` and `$lit` is substituted for a string literal. 2. `extern "abi_that_does_not_exist"` is now *syntactically* legal whereas before, the set of ABI strings was hard-coded into the grammar of the language. With this PR, the set of ABIs are instead validated and translated during lowering. That seems more appropriate. 3. `ast::FloatTy` is now distinct from `rustc_target::abi::FloatTy`. The former is used substantially more and the translation between them is only necessary in a single place. 4. As a result of 2-3, libsyntax no longer depends on librustc_target, which should improve pipe-lining somewhat. cc @rust-lang/lang -- the points 1-2 slightly change the definition of the language but in a way which seems consistent with our general principles (in particular wrt. the discussions of turning things into semantic errors). I expect this to be uncontroversial but it's worth letting y'all know. :) r? @varkor
Rollup of 5 pull requests Successful merges: - #59789 (Revert two unapproved changes to rustc_typeck.) - #65752 (Use structured suggestions for missing associated items) - #65884 (syntax: ABI-oblivious grammar) - #65974 (A scheme for more macro-matcher friendly pre-expansion gating) - #66017 (Add future incompatibility lint for `array.into_iter()`) Failed merges: - #66056 (rustc_metadata: Some reorganization of the module structure) r? @ghost
rustc_target: inline abi::FloatTy into abi::Primitive. This effectively undoes a small part of @oli-obk's rust-lang#50967, now that the rest of the compiler doesn't use the `FloatTy` definition from `rustc_target`, post-rust-lang#65884.
This PR has the following effects:
extern $litis now legal where$lit:literaland$litis substituted for a string literal.extern "abi_that_does_not_exist"is now syntactically legal whereas before, the set of ABI strings was hard-coded into the grammar of the language. With this PR, the set of ABIs are instead validated and translated during lowering. That seems more appropriate.ast::FloatTyis now distinct fromrustc_target::abi::FloatTy. The former is used substantially more and the translation between them is only necessary in a single place.As a result of 2-3, libsyntax no longer depends on librustc_target, which should improve pipe-lining somewhat.
cc @rust-lang/lang -- the points 1-2 slightly change the definition of the language but in a way which seems consistent with our general principles (in particular wrt. the discussions of turning things into semantic errors). I expect this to be uncontroversial but it's worth letting y'all know. :)
r? @varkor