about summary refs log tree commit diff
path: root/src/libsyntax_expand
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-07 08:51:55 +0100
committerGitHub <noreply@github.com>2019-11-07 08:51:55 +0100
commit883fe10da2f0651540fd5824898b7d7476969c41 (patch)
treec91a306e3e0e4d2f84a8c63245eac622d065eb8f /src/libsyntax_expand
parenta3c8572b545124b62dcd16fb4b354f2efe842f35 (diff)
parent55f76cdb2f4d01cf87e47148c706c53a129fa45e (diff)
downloadrust-883fe10da2f0651540fd5824898b7d7476969c41.tar.gz
rust-883fe10da2f0651540fd5824898b7d7476969c41.zip
Rollup merge of #65884 - Centril:non-hardcoded-abis, r=petrochenkov
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
Diffstat (limited to 'src/libsyntax_expand')
-rw-r--r--src/libsyntax_expand/Cargo.toml1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libsyntax_expand/Cargo.toml b/src/libsyntax_expand/Cargo.toml
index d98b9457a62..02c711bc387 100644
--- a/src/libsyntax_expand/Cargo.toml
+++ b/src/libsyntax_expand/Cargo.toml
@@ -21,6 +21,5 @@ errors = { path = "../librustc_errors", package = "rustc_errors" }
 rustc_data_structures = { path = "../librustc_data_structures" }
 rustc_index = { path = "../librustc_index" }
 rustc_lexer = { path = "../librustc_lexer" }
-rustc_target = { path = "../librustc_target" }
 smallvec = { version = "1.0", features = ["union", "may_dangle"] }
 syntax = { path = "../libsyntax" }