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

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2 #101041

Merged
merged 4 commits into from
Sep 8, 2022
Merged

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2 #101041

merged 4 commits into from
Sep 8, 2022

Conversation

beowolx
Copy link
Contributor

@beowolx beowolx commented Aug 26, 2022

Description

This is the second part of the rustc_session migration.

Please only review this commit that belongs to the part 2. The other ones are from the PR #100753 that is not yet merged.

In this PR, we migrate the files session.rs and config.rs.

Please not that we have to allow the lints rules in some functions from session.rs because they are (at least I believe) part of the diagnostic machinery.

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 26, 2022
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @TaKO8Ki (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2022
@beowolx beowolx marked this pull request as ready for review August 30, 2022 19:57
@rustbot
Copy link
Collaborator

rustbot commented Aug 30, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@beowolx
Copy link
Contributor Author

beowolx commented Aug 30, 2022

@rustbot ready

@beowolx beowolx mentioned this pull request Aug 30, 2022
84 tasks
@beowolx
Copy link
Contributor Author

beowolx commented Aug 30, 2022

r? @davidtwco

@rust-highfive rust-highfive assigned davidtwco and unassigned TaKO8Ki Aug 30, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 31, 2022
…t-no-self-lint, r=fee1-dead

lint: avoid linting diag functions with diag lints

Functions annotated with `#[rustc_lint_diagnostics]` are used by the diagnostic migration lints to know when to lint, but functions that are annotated with this attribute shouldn't themselves be linted.

cc rust-lang#100717 rust-lang#101041 (comment)
@bors

This comment was marked as resolved.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 31, 2022
…t-no-self-lint, r=fee1-dead

lint: avoid linting diag functions with diag lints

Functions annotated with `#[rustc_lint_diagnostics]` are used by the diagnostic migration lints to know when to lint, but functions that are annotated with this attribute shouldn't themselves be linted.

cc rust-lang#100717 rust-lang#101041 (comment)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 31, 2022
…t-no-self-lint, r=fee1-dead

lint: avoid linting diag functions with diag lints

Functions annotated with `#[rustc_lint_diagnostics]` are used by the diagnostic migration lints to know when to lint, but functions that are annotated with this attribute shouldn't themselves be linted.

cc rust-lang#100717 rust-lang#101041 (comment)
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

This is almost ready, I've left one additional suggestion.

compiler/rustc_session/src/config.rs Outdated Show resolved Hide resolved
compiler/rustc_error_messages/locales/en-US/session.ftl Outdated Show resolved Hide resolved
compiler/rustc_error_messages/locales/en-US/session.ftl Outdated Show resolved Hide resolved
compiler/rustc_error_messages/locales/en-US/session.ftl Outdated Show resolved Hide resolved
compiler/rustc_session/src/session.rs Outdated Show resolved Hide resolved
compiler/rustc_session/src/session.rs Show resolved Hide resolved
@beowolx
Copy link
Contributor Author

beowolx commented Sep 7, 2022

I have just amended my last commit with some of the changes requested by @davidtwco and you can check the diff here.

This thread still not resolved.

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

r=me unless #101041 (comment) needs more work

…rked with rustc_lint_diagnostic

This commit removes the allows rules for the SessionDiagnostic lint
that were being used in the session.rs file.

Thanks to the PR #101230 we do not need to annotate the methods with
the allow rule as they are part of the diagnostic machinery.
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

r=me after removing the unused Fluent message

@beowolx
Copy link
Contributor Author

beowolx commented Sep 8, 2022

r? @davidtwco

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 8, 2022

📌 Commit 0e497a7 has been approved by davidtwco

It is now in the queue for this repository.

@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 Sep 8, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 8, 2022
…name-attr-warning-pt2, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2

# Description

This is the second part of the `rustc_session` [migration](rust-lang#100717 (comment)).

**Please only review this [commit](rust-lang@5018581) that belongs to the part 2. The other ones are from the PR [rust-lang#100753](rust-lang#100753) that is not yet merged.**

In this PR, we migrate the files `session.rs` and `config.rs`.

Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 8, 2022
…name-attr-warning-pt2, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2

# Description

This is the second part of the `rustc_session` [migration](rust-lang#100717 (comment)).

**Please only review this [commit](rust-lang@5018581) that belongs to the part 2. The other ones are from the PR [rust-lang#100753](rust-lang#100753) that is not yet merged.**

In this PR, we migrate the files `session.rs` and `config.rs`.

Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#98933 (Opaque types' generic params do not imply anything about their hidden type's lifetimes)
 - rust-lang#101041 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2)
 - rust-lang#101424 (Adjust and slightly generalize operator error suggestion)
 - rust-lang#101496 (Allow lower_lifetime_binder receive a closure)
 - rust-lang#101501 (Allow lint passes to be bound by `TyCtxt`)
 - rust-lang#101515 (Recover from typo where == is used in place of =)
 - rust-lang#101545 (Remove unnecessary `PartialOrd` and `Ord`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1561922 into rust-lang:master Sep 8, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 8, 2022
@beowolx beowolx deleted the translation-rename-attr-warning-pt2 branch September 9, 2022 06:19
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 12, 2022
…stcsession-pt3, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final

# Description
This is the final part of the rustc_session rust-lang#100717 (comment).

Please only review this [commit](rust-lang@a545347). The other ones are from the PR rust-lang#101041 that is not yet merged.

In this PR, we migrate the file `output.rs`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 13, 2022
…stcsession-pt3, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final

# Description
This is the final part of the rustc_session rust-lang#100717 (comment).

Please only review this [commit](rust-lang@a545347). The other ones are from the PR rust-lang#101041 that is not yet merged.

In this PR, we migrate the file `output.rs`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 13, 2022
…stcsession-pt3, r=davidtwco

translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final

# Description
This is the final part of the rustc_session rust-lang#100717 (comment).

Please only review this [commit](rust-lang@a545347). The other ones are from the PR rust-lang#101041 that is not yet merged.

In this PR, we migrate the file `output.rs`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 6, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#98933 (Opaque types' generic params do not imply anything about their hidden type's lifetimes)
 - rust-lang#101041 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2)
 - rust-lang#101424 (Adjust and slightly generalize operator error suggestion)
 - rust-lang#101496 (Allow lower_lifetime_binder receive a closure)
 - rust-lang#101501 (Allow lint passes to be bound by `TyCtxt`)
 - rust-lang#101515 (Recover from typo where == is used in place of =)
 - rust-lang#101545 (Remove unnecessary `PartialOrd` and `Ord`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants