Skip to content

Borrowck: diag migrate - #101276

Closed
AndyJado wants to merge 25 commits into
rust-lang:masterfrom
AndyJado:borrowck-diag-mig
Closed

Borrowck: diag migrate#101276
AndyJado wants to merge 25 commits into
rust-lang:masterfrom
AndyJado:borrowck-diag-mig

Conversation

@AndyJado

Copy link
Copy Markdown
Contributor

No description provided.

@rustbotrustbot 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 Sep 1, 2022
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2022
@petrochenkov
petrochenkov marked this pull request as ready for review September 1, 2022 14:28
@rustbot

Copy link
Copy Markdown
Collaborator

rustc_error_messages was changed

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

@petrochenkovpetrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 1, 2022
@petrochenkov

Copy link
Copy Markdown
Contributor

Since this was submitted as a draft, changing it to S-waiting-on-author.

@davidtwco

Copy link
Copy Markdown
Member

r? @davidtwco

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@AndyJado

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 3, 2022
This was referenced Sep 3, 2022
@AndyJado
AndyJadoforce-pushed the borrowck-diag-mig branch 2 times, most recently from 3f40403 to 5d2428fCompareSeptember 4, 2022 08:31
@rust-log-analyzer

This comment has been minimized.

@AndyJado
AndyJadoforce-pushed the borrowck-diag-mig branch 4 times, most recently from dc89bd1 to 2448a00CompareSeptember 5, 2022 08:16
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job mingw-check failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)
 Checking rustc_codegen_ssa v0.0.0 (/checkout/compiler/rustc_codegen_ssa)
Checking rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
Checking rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
Checking rustc_codegen_llvm v0.0.0 (/checkout/compiler/rustc_codegen_llvm)
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
|
608 | macro_rules! struct_span_err {
| ---------------------------- in this expansion of `struct_span_err!`
| ---------------------------- in this expansion of `struct_span_err!`
609 | ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
610 | $session.struct_span_err_with_code(
|
::: compiler/rustc_borrowck/src/borrowck_errors.rs:50:23
|
50 | let mut err = struct_span_err!(
50 | let mut err = struct_span_err!(
| _______________________-
51 | | self,
52 | | new_loan_span,
53 | | E0499,
... |
56 | | via(opt_via),
| |_________- in this macro invocation
|
note: the lint level is defined here
--> compiler/rustc_borrowck/src/borrowck_errors.rs:2:9
--> compiler/rustc_borrowck/src/borrowck_errors.rs:2:9
|
2 | #![deny(rustc::diagnostic_outside_of_impl)]
error: diagnostics should be created using translatable messages
|
608 | macro_rules! struct_span_err {
| ---------------------------- in this expansion of `struct_span_err!`
| ---------------------------- in this expansion of `struct_span_err!`
609 | ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
610 | $session.struct_span_err_with_code(
|
::: compiler/rustc_borrowck/src/borrowck_errors.rs:50:23
|
50 | let mut err = struct_span_err!(
50 | let mut err = struct_span_err!(
| _______________________-
51 | | self,
52 | | new_loan_span,
53 | | E0499,
... |
56 | | via(opt_via),
| |_________- in this macro invocation
|
note: the lint level is defined here
--> compiler/rustc_borrowck/src/borrowck_errors.rs:1:9
--> compiler/rustc_borrowck/src/borrowck_errors.rs:1:9
|
1 | #![deny(rustc::untranslatable_diagnostic)]
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
|
608 | macro_rules! struct_span_err {
| ---------------------------- in this expansion of `struct_span_err!`
| ---------------------------- in this expansion of `struct_span_err!`
609 | ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
610 | $session.struct_span_err_with_code(
|
::: compiler/rustc_borrowck/src/borrowck_errors.rs:177:23
|
177 | let mut err = struct_span_err!(
177 | let mut err = struct_span_err!(
| _______________________-
178 | | self,
179 | | span,
180 | | E0502,
... |
187 | | via(msg_old),
| |_________- in this macro invocation
error: diagnostics should be created using translatable messages
|
608 | macro_rules! struct_span_err {
| ---------------------------- in this expansion of `struct_span_err!`
| ---------------------------- in this expansion of `struct_span_err!`
609 | ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
610 | $session.struct_span_err_with_code(
|
::: compiler/rustc_borrowck/src/borrowck_errors.rs:177:23
|
177 | let mut err = struct_span_err!(
177 | let mut err = struct_span_err!(
| _______________________-
178 | | self,
179 | | span,
180 | | E0502,
... |
187 | | via(msg_old),
| |_________- in this macro invocation
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
|
608 | macro_rules! struct_span_err {
| ---------------------------- in this expansion of `struct_span_err!`
| ---------------------------- in this expansion of `struct_span_err!`
609 | ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
610 | $session.struct_span_err_with_code(
|
::: compiler/rustc_borrowck/src/borrowck_errors.rs:301:9
|
|
301 | struct_span_err!(self, span, E0596, "cannot borrow {} as mutable{}", path, reason,)
error: diagnostics should be created using translatable messages
|
608 | macro_rules! struct_span_err {
| ---------------------------- in this expansion of `struct_span_err!`
| ---------------------------- in this expansion of `struct_span_err!`
609 | ($session:expr, $span:expr, $code:ident, $($message:tt)*) => ({
610 | $session.struct_span_err_with_code(
|
::: compiler/rustc_borrowck/src/borrowck_errors.rs:301:9
|
|
301 | struct_span_err!(self, span, E0596, "cannot borrow {} as mutable{}", path, reason,)
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
--> compiler/rustc_borrowck/src/borrowck_errors.rs:395:29
|
395 | self.infcx.tcx.sess.struct_span_err_with_code(sp, msg, code)
error: diagnostics should be created using translatable messages
--> compiler/rustc_borrowck/src/borrowck_errors.rs:395:29
|
395 | self.infcx.tcx.sess.struct_span_err_with_code(sp, msg, code)
error: could not compile `rustc_borrowck` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `rustc_borrowck` due to 8 previous errors

@AndyJado

Copy link
Copy Markdown
ContributorAuthor

@rustbot label +S-waiting-on-author -S-waiting-on-review

@rustbotrustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 9, 2022
@AndyJado

Copy link
Copy Markdown
ContributorAuthor

moved

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticS-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-compilerRelevant 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.

6 participants

@AndyJado@rust-highfive@rustbot@petrochenkov@davidtwco@rust-log-analyzer