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

Remove old quasi quoting APIs #46849

Closed
Manishearth opened this issue Dec 19, 2017 · 4 comments
Closed

Remove old quasi quoting APIs #46849

Manishearth opened this issue Dec 19, 2017 · 4 comments
Assignees
Labels
A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@Manishearth
Copy link
Member

We still have the quote_foo! macros. They aren't used anywhere within rustc, and they are used by cargo and clippy for testing syntax extension related things.

We can update cargo and clippy to use other APIs (and eventually move them to TokenStream).

rust-lang/cargo#4838 is the cargo PR; will make a clippy one shortly.

@Manishearth Manishearth added A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup. labels Dec 19, 2017
@Manishearth Manishearth self-assigned this Dec 19, 2017
@Manishearth
Copy link
Member Author

Cargo landed. Blocked on rust-lang/rust-clippy#2283

@Mark-Simulacrum
Copy link
Member

Clippy is also now fixed. I believe the main decision to be made here is whether to remove the old quote_ tests unilaterally or attempt to likewise convert them to either proc_macro and/or manual expansions of the quote_ macros. I lean towards simply removing them.

If we're to just remove them, then this should be a fairly easy PR to make.

@Manishearth Manishearth added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Jun 1, 2018
@Manishearth
Copy link
Member Author

Okay, so the code that needs to be changed is at

if enable_quotes {
use syntax::ext::quote::*;
register! {
quote_tokens: expand_quote_tokens,
quote_expr: expand_quote_expr,
quote_ty: expand_quote_ty,
quote_item: expand_quote_item,
quote_pat: expand_quote_pat,
quote_arm: expand_quote_arm,
quote_stmt: expand_quote_stmt,
quote_attr: expand_quote_attr,
quote_arg: expand_quote_arg,
quote_block: expand_quote_block,
quote_meta_item: expand_quote_meta_item,
quote_path: expand_quote_path,
}
}
. We need to remove that, and any other peripheral stuff related to it like the enable_quotes stuff.

Then delete the tests for it. There shouldn't be any uses left.

@est31
Copy link
Member

est31 commented Jun 23, 2018

Seems that cargo still uses quote inside a #![feature] attr. Made a pr to remove it rust-lang/cargo#5647

bors added a commit to rust-lang/cargo that referenced this issue Jun 23, 2018
Remove quote feature use

Quote is being removed see rust-lang/rust#46849. Follow up of @Manishearth 's #4838 which removed usages of the feature so now we only have to remove `quote` from the `#![feature]` attrs.
bors added a commit that referenced this issue Sep 30, 2018
Remove quote_*! macros

This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved.

Fixes #46849.
Fixes #12265.
Fixes #12266.

r? @Manishearth
bors added a commit that referenced this issue Oct 2, 2018
Remove quote_*! macros

This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved.

Fixes #46849.
Fixes #12265.
Fixes #12266.

r? @Manishearth
bors added a commit that referenced this issue Dec 8, 2018
Remove quote_*! macros

This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved.

Fixes #46849.
Fixes #12265.
Fixes #12266.
Fixes #26994.

r? @Manishearth
bors added a commit that referenced this issue Jan 23, 2019
Remove quote_*! macros

This deletes a considerable amount of test cases, some of which we may want to keep. I'm not entirely certain what the primary intent of many of them was; if we should keep them I can attempt to edit each case to continue compiling without the quote_*! macros involved.

Fixes #46849.
Fixes #12265.
Fixes #12266.
Fixes #26994.

r? @Manishearth
@bors bors closed this as completed in 01f8e25 Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants