Skip to content
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

#ast should only generate calls to the qquote module #2260

Closed
brson opened this issue Apr 20, 2012 · 1 comment
Closed

#ast should only generate calls to the qquote module #2260

brson opened this issue Apr 20, 2012 · 1 comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@brson
Copy link
Contributor

brson commented Apr 20, 2012

The #ast extension generates code that makes calls to internal rustc APIs. Most of those calls are to functions in the qquote module itself, but some are to the parser. This makes changing these parser functions difficult, since the stage0 compiler will continue generating calls to the old function. Code generated by #ast should use an obvious, qquote-specific API, and preferably shouldn't mention any types that exist outside of the qquote module.

For example, the types and functions used by #fmt-generated code all live in std::extfmt::rt.

@graydon
Copy link
Contributor

graydon commented Mar 12, 2013

the replacement (quote.rs) code for this routes everything through syntax::ext::quote::rt. Closing.

@graydon graydon closed this as completed Mar 12, 2013
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Use FnAbi instead of function signature when generating code for
function types. Properly check the `PassMode::Ignore`. For foreign
functions, instead of ignoring the declaration type, cast the arguments
and return value.

For now, we also ignore the caller location, since we don't currently
support tracking caller location. This change makes it easier for us to
do so. We might want to wait for this issue to get fixed so we can
easily add support using stable APIs:
rust-lang/project-stable-mir#62

Resolves rust-lang#2260
Resolves rust-lang#2312
Resolves rust-lang#1365
Resolves rust-lang#1350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

2 participants