-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
compiletest: Parse aux proc-macro directive into struct
#151670
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
Conversation
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
To minimize the diff when adding features the aux `proc-macro` directive.
be7b3f2 to
30e41de
Compare
proc-pacro directive into structproc-macro directive into struct
| } | ||
|
|
||
| /// The value of a `proc-macro` directive. | ||
| #[derive(Clone, Debug, Default)] |
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.
Remark: These structs shouldn't actually need to be Default, but I'm fine with merging this as-is (since it matches the others) and then fixing all of them in a separate follow-up PR.
|
Thanks for splitting these up; it makes reviewing each part much nicer. @bors r+ rollup |
compiletest: Parse aux `proc-macro` directive into struct This PR does not introduce any changes. It is pure refactoring to make PR rust-lang#151258 smaller so it is easier to see what that PR is about, as discussed [here](rust-lang#151258 (comment)). r? @Zalathar
Rollup merge of #151670 - Enselic:proc-macro-struct, r=Zalathar compiletest: Parse aux `proc-macro` directive into struct This PR does not introduce any changes. It is pure refactoring to make PR #151258 smaller so it is easier to see what that PR is about, as discussed [here](#151258 (comment)). r? @Zalathar
Rollup of 2 pull requests Successful merges: - rust-lang/rust#151612 (Update documentation for `cold_path`, `likely`, and `unlikely`) - rust-lang/rust#151670 (compiletest: Parse aux `proc-macro` directive into struct)
…thar compiletest: Support `--extern` modifiers with `proc-macro` directive So that the `src/tools/compiletest/src/directives/auxiliary/tests.rs` test does not have to (ab)use the `aux-crate` directive for this purpose. This is very edge-casey so I don't think we should document this in rustc-dev-guide. Mentioning it will confuse more than it helps. If someone needs to do this they will look at the code and easily find the functionality. This is a bit hacky since `--extern priv:pm.rs` is not valid, but we can make our directives work however we want. And I think this is a fine pragmatic approach. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if wanted. r? @Zalathar --- Follow-up to: - rust-lang#151353 - rust-lang#151670 ### Unblocks: - rust-lang#151691, because without this fix that test fails (see rust-lang#151691 (comment))
…thar compiletest: Support `--extern` modifiers with `proc-macro` directive So that the `src/tools/compiletest/src/directives/auxiliary/tests.rs` test does not have to (ab)use the `aux-crate` directive for this purpose. This is very edge-casey so I don't think we should document this in rustc-dev-guide. Mentioning it will confuse more than it helps. If someone needs to do this they will look at the code and easily find the functionality. This is a bit hacky since `--extern priv:pm.rs` is not valid, but we can make our directives work however we want. And I think this is a fine pragmatic approach. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if wanted. r? @Zalathar --- Follow-up to: - rust-lang#151353 - rust-lang#151670 ### Unblocks: - rust-lang#151691, because without this fix that test fails (see rust-lang#151691 (comment))
…thar compiletest: Support `--extern` modifiers with `proc-macro` directive So that the `src/tools/compiletest/src/directives/auxiliary/tests.rs` test does not have to (ab)use the `aux-crate` directive for this purpose. This is very edge-casey so I don't think we should document this in rustc-dev-guide. Mentioning it will confuse more than it helps. If someone needs to do this they will look at the code and easily find the functionality. This is a bit hacky since `--extern priv:pm.rs` is not valid, but we can make our directives work however we want. And I think this is a fine pragmatic approach. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if wanted. r? @Zalathar --- Follow-up to: - rust-lang#151353 - rust-lang#151670 ### Unblocks: - rust-lang#151691, because without this fix that test fails (see rust-lang#151691 (comment))
Rollup merge of #151695 - Enselic:proc-macro-priv-v2, r=Zalathar compiletest: Support `--extern` modifiers with `proc-macro` directive So that the `src/tools/compiletest/src/directives/auxiliary/tests.rs` test does not have to (ab)use the `aux-crate` directive for this purpose. This is very edge-casey so I don't think we should document this in rustc-dev-guide. Mentioning it will confuse more than it helps. If someone needs to do this they will look at the code and easily find the functionality. This is a bit hacky since `--extern priv:pm.rs` is not valid, but we can make our directives work however we want. And I think this is a fine pragmatic approach. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if wanted. r? @Zalathar --- Follow-up to: - #151353 - #151670 ### Unblocks: - #151691, because without this fix that test fails (see #151691 (comment))
This PR does not introduce any changes. It is pure refactoring to make PR #151258 smaller so it is easier to see what that PR is about, as discussed here.
r? @Zalathar