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

Move DIAGNOSTICS usage to rustc_driver #66456

Merged
merged 1 commit into from
Nov 17, 2019
Merged

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Nov 15, 2019

Remove rustc_interface's dependency on rustc_error_codes and centralize all usages of DIAGNOSTICS in rustc_driver. Once we remove all references to rustc_error_codes in all other crates but rustc_driver, this should allow for incremental recompilation of the compiler to be smoother when tweaking error codes. This works towards #66210 (comment).

(May include traces of minor drive-by cleanup.)

r? @Mark-Simulacrum

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 15, 2019
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's entirely worth doing this; it feels like the code is not significantly better and the improvement in compile times (2 crates -- rustc_interface and rustc_driver before, just rustc_driver now) is not really significant as neither crate is all that large.

src/librustc_driver/lib.rs Outdated Show resolved Hide resolved
src/librustc_interface/interface.rs Outdated Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member

Modulo those nits and if you think it's worth it then r=me.

@Centril Centril force-pushed the driver-codes branch 2 times, most recently from 4a86489 to f55a2e7 Compare November 15, 2019 20:03
@Centril
Copy link
Contributor Author

Centril commented Nov 15, 2019

@Mark-Simulacrum It's not a big win, but still, a bit of cleanup and a small recompilation win here and there builds to something larger. ^^

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 15, 2019

📌 Commit f55a2e7dd791c8fe845e01149fe1d835c19e78ac has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2019
@rust-highfive

This comment has been minimized.

@Centril
Copy link
Contributor Author

Centril commented Nov 15, 2019

@bors r- ^

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 15, 2019
@Centril
Copy link
Contributor Author

Centril commented Nov 15, 2019

Moved the macro back to avoid the problem with the index page; I'll wait with r=you for a bit.

@rust-highfive

This comment has been minimized.

@Centril
Copy link
Contributor Author

Centril commented Nov 17, 2019

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Nov 17, 2019

📌 Commit 8444e16 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 17, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Nov 17, 2019
…crum

Move `DIAGNOSTICS` usage to `rustc_driver`

Remove `rustc_interface`'s dependency on `rustc_error_codes` and centralize all usages of `DIAGNOSTICS` in `rustc_driver`. Once we remove all references to `rustc_error_codes` in all other crates but `rustc_driver`, this should allow for incremental recompilation of the compiler to be smoother when tweaking error codes. This works towards rust-lang#66210 (comment).

(May include traces of minor drive-by cleanup.)

r? @Mark-Simulacrum
bors added a commit that referenced this pull request Nov 17, 2019
Rollup of 11 pull requests

Successful merges:

 - #65739 (Improve documentation of `Vec::split_off(...)`)
 - #66271 (syntax: Keep string literals in ABIs and `asm!` more precisely)
 - #66344 (rustc_plugin: Remove `Registry::register_attribute`)
 - #66381 (find_deprecation: deprecation attr may be ill-formed meta.)
 - #66395 (Centralize panic macro documentation)
 - #66456 (Move `DIAGNOSTICS` usage to `rustc_driver`)
 - #66465 (add missing 'static lifetime in docs)
 - #66466 (miri panic_unwind: fix hack for SEH platforms)
 - #66469 (Use "field is never read" instead of "field is never used")
 - #66471 (Add test for issue 63116)
 - #66477 (Clarify transmute_copy documentation example)

Failed merges:

r? @ghost
@bors bors merged commit 8444e16 into rust-lang:master Nov 17, 2019
@Centril Centril deleted the driver-codes branch November 17, 2019 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants