Skip to content

Conversation

Rejyr
Copy link
Contributor

@Rejyr Rejyr commented Aug 19, 2022

Draft PR for migrating rustc_lint to SessionDiagnostic, as part of the recent blog post

@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 19, 2022
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (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 19, 2022
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Aug 22, 2022

r? @davidtwco

@rust-highfive rust-highfive assigned davidtwco and unassigned oli-obk Aug 22, 2022
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 a great start! I've left a couple comments. Also, we have a "no merge policy" and prefer rebases, if you could fix that it would be great:

https://rustc-dev-guide.rust-lang.org/git.html?highlight=rebae#no-merge-policy

@Rejyr Rejyr force-pushed the diagnostic-migration-rustc-lint branch from 1c858d2 to 257cf03 Compare August 22, 2022 12:34
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.

LGTM, r=me, but I'll give you a bit to see the comment about IntoDiagnosticArg and to chose to address it or not.

@davidtwco davidtwco mentioned this pull request Aug 23, 2022
84 tasks
@Rejyr Rejyr changed the title Migrate rustc_lint to SessionDiagnostic Migrate rustc_lint errors to SessionDiagnostic Aug 23, 2022
@Rejyr Rejyr marked this pull request as ready for review August 23, 2022 15:19
@rustbot
Copy link
Collaborator

rustbot commented Aug 23, 2022

rustc_error_messages was changed

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

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 23, 2022

📌 Commit 1693993 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 23, 2022
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 23, 2022
@compiler-errors
Copy link
Member

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 27, 2022
…mpiler-errors

Rollup of 9 pull requests

Successful merges:

 - rust-lang#100724 (Migrate ast lowering to session diagnostic)
 - rust-lang#100735 (Migrate `rustc_ty_utils` to `SessionDiagnostic`)
 - rust-lang#100738 (Diagnostics migr const eval)
 - rust-lang#100744 (Migrate rustc_mir_dataflow to diagnostic structs)
 - rust-lang#100776 (Migrate `rustc_lint` errors to `SessionDiagnostic`)
 - rust-lang#100817 (sugg: suggest the usage of boolean value when there is a typo in the keyword)
 - rust-lang#100836 (Migrate `rustc_attr` crate diagnostics)
 - rust-lang#100890 (Migrate rustc_driver to SessionDiagnostic)
 - rust-lang#100900 (on `region_errors.rs`)

Failed merges:

 - rust-lang#100831 (Migrate `symbol_mangling` module to new diagnostics structs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 389dda1 into rust-lang:master Aug 27, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 27, 2022
@Rejyr Rejyr deleted the diagnostic-migration-rustc-lint branch August 27, 2022 12:25
@Rejyr Rejyr restored the diagnostic-migration-rustc-lint branch August 27, 2022 12:26
@Rejyr Rejyr mentioned this pull request Aug 28, 2022
5 tasks
@Rejyr Rejyr deleted the diagnostic-migration-rustc-lint branch November 9, 2022 01:59
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2023
…t-pt2, r=davidtwco

Migrate `rustc_lint` lint diagnostics

Part 2 of [Migrate `rustc_lint` errors to `SessionDiagnostic`](rust-lang#100776)

r? `@davidtwco`

# TODO
- [x] Refactor some lints manually implementing `DecorateLint` to use `Option<Subdiagnostic>`.
- [x] Add `#[rustc_lint_diagnostics]` to lint functions in `context.rs`.
- [x] Migrate `hidden_unicode_codepoints.rs`.
- [x] Migrate `UnsafeCode` in `builtin.rs`.
- [x] Migrate the rest of `builtin.rs`.
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Jan 13, 2023
…davidtwco

Migrate `rustc_lint` lint diagnostics

Part 2 of [Migrate `rustc_lint` errors to `SessionDiagnostic`](rust-lang/rust#100776)

r? `@davidtwco`

# TODO
- [x] Refactor some lints manually implementing `DecorateLint` to use `Option<Subdiagnostic>`.
- [x] Add `#[rustc_lint_diagnostics]` to lint functions in `context.rs`.
- [x] Migrate `hidden_unicode_codepoints.rs`.
- [x] Migrate `UnsafeCode` in `builtin.rs`.
- [x] Migrate the rest of `builtin.rs`.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
…davidtwco

Migrate `rustc_lint` lint diagnostics

Part 2 of [Migrate `rustc_lint` errors to `SessionDiagnostic`](rust-lang/rust#100776)

r? `@davidtwco`

# TODO
- [x] Refactor some lints manually implementing `DecorateLint` to use `Option<Subdiagnostic>`.
- [x] Add `#[rustc_lint_diagnostics]` to lint functions in `context.rs`.
- [x] Migrate `hidden_unicode_codepoints.rs`.
- [x] Migrate `UnsafeCode` in `builtin.rs`.
- [x] Migrate the rest of `builtin.rs`.
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
…davidtwco

Migrate `rustc_lint` lint diagnostics

Part 2 of [Migrate `rustc_lint` errors to `SessionDiagnostic`](rust-lang/rust#100776)

r? `@davidtwco`

# TODO
- [x] Refactor some lints manually implementing `DecorateLint` to use `Option<Subdiagnostic>`.
- [x] Add `#[rustc_lint_diagnostics]` to lint functions in `context.rs`.
- [x] Migrate `hidden_unicode_codepoints.rs`.
- [x] Migrate `UnsafeCode` in `builtin.rs`.
- [x] Migrate the rest of `builtin.rs`.
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.

8 participants