Commit Graph

194 Commits

Author SHA1 Message Date
Michael Goulet
389dda149c
Rollup merge of #100776 - Rejyr:diagnostic-migration-rustc-lint, r=davidtwco
Migrate `rustc_lint` errors to `SessionDiagnostic`

Draft PR for migrating `rustc_lint` to `SessionDiagnostic`, as part of the [recent blog post](https://blog.rust-lang.org/inside-rust/2022/08/16/diagnostic-effort.html)
2022-08-26 15:56:25 -07:00
Michael Goulet
93b2acd88a
Rollup merge of #100744 - 5225225:migrate-rustc-mir-dataflow, r=davidtwco
Migrate rustc_mir_dataflow to diagnostic structs
2022-08-26 15:56:24 -07:00
Michael Goulet
b54344401a
Rollup merge of #100738 - nidnogg:diagnostics_migr_const_eval, r=davidtwco
Diagnostics migr const eval

This PR should eventually contain all diagnostic migrations for the `rustc_const_eval` crate.

r? `@davidtwco`
`@rustbot` label +A-translation
2022-08-26 15:56:23 -07:00
Michael Goulet
181b0410ec
Rollup merge of #100735 - Facel3ss1:ty-utils-translation, r=davidtwco
Migrate `rustc_ty_utils` to `SessionDiagnostic`

I have migrated the `rustc_ty_utils` crate to use `SessionDiagnostic`, motivated by the [recent blog post about the diagnostic translation effort](https://blog.rust-lang.org/inside-rust/2022/08/16/diagnostic-effort.html).

This is my first PR to the Rust repository, so if I have missed anything, or anything needs to be changed, please let me know! 😄

`@rustbot` label +A-translation
2022-08-26 15:56:22 -07:00
Michael Goulet
bc1d205e4c
Rollup merge of #100724 - JeanCASPAR:migrate-ast_lowering-to-session-diagnostic, r=davidtwco
Migrate ast lowering to session diagnostic

I migrated the whole rustc_ast_lowering crate to session diagnostic *except* the for the use of `span_fatal` at /compiler/rustc_ast_lowering/src/expr.rs#L1268 because `#[fatal(...)]` is not yet supported (see https://github.com/rust-lang/rust/pull/100694).
2022-08-26 15:56:21 -07:00
Peter Medus
01c1616b25 Migrate rustc_ty_utils to use SessionDiagnostic 2022-08-26 14:36:51 +01:00
Yuki Okushi
0fd4a74139
Rollup merge of #100808 - SkiFire13:migrate_diagnostics_rustc_interface, r=davidtwco
Migrate `rustc_interface` diagnostics

``@rustbot`` label +A-translation

r? rust-lang/diagnostics
cc #100717
2022-08-25 08:50:58 +09:00
Yuki Okushi
2e4760c7e7
Rollup merge of #100780 - wonchulee:translation_save_analysis, r=davidtwco
save_analysis: Migrate diagnostic

* Migrate the `rustc_save_analysis` crate's diagnostic to translatable diagnostic structs.

Depends on https://github.com/rust-lang/rust/pull/100694 and https://github.com/rust-lang/rust/pull/100754 for #[fatal(..)] support, then aa68eb4179, f5219a3960, 7da52f694a can be removed. (I copied commits from https://github.com/rust-lang/rust/pull/100754)
2022-08-25 08:50:57 +09:00
bors
87991d5f5d Auto merge of #100675 - Xiretza:fluent-mandate-crate-prefix, r=davidtwco
fluent: mandate slug names to be prefixed by crate name

This is currently only convention, but not actively checked for.

Additionally, improve error messages to highlight the path of the offending fluent file rather than the identifier preceding it.

This will conflict with #100671, so I'll leave it as draft until that's merged.
2022-08-23 22:30:07 +00:00
Wonchul Lee
9b95eef6ea
save_analysis: Migrate diagnostics 2022-08-24 06:50:16 +09:00
Dylan DPC
35f2d125ca
Rollup merge of #100768 - Facel3ss1:plugin-impl-translation, r=davidtwco
Migrate `rustc_plugin_impl` to `SessionDiagnostic`

Migration of the `rustc_plugin_impl` crate.
~Draft PR because it is blocked on #100694 for `#[fatal(...)]` support~ (this has been merged, and I've changed over to `#[diag(...)]` now too), but I would also like to know if what I did with `LoadPluginError` is okay, because all it does is display the error message from `libloading` ([See conversation on zulip](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.23100717.20diagnostic.20translation/near/294327843)). This crate is apparently for a deprecated feature which is used by servo, so I don't know how much this matters anyway.
2022-08-23 20:40:04 +05:30
5225225
f20cc9ae4e Rename rustc_mir_dataflow diagnostic to mir_dataflow 2022-08-23 13:48:15 +01:00
5225225
7f125ed7d5 Remove full stop in diagnostic message 2022-08-23 13:18:45 +01:00
5225225
ee2b16100e Migrate rustc_mir_dataflow to diagnostic structs 2022-08-23 11:24:51 +01:00
Jean CASPAR
9472df10d0 Changes made in response to feedback 2022-08-22 19:24:14 +02:00
Jean CASPAR
e701c72a63 Migrate all span_err(...) in ast_lowering to SessionDiagnostic 2022-08-22 19:21:41 +02:00
Jean CASPAR
5164966591 Migrate ast_lowering::pat to SessionDiagnostic 2022-08-22 19:21:41 +02:00
Jean CASPAR
d75fd91d50 Migrate ast_lowering::ast to SessionDiagnostic 2022-08-22 19:21:39 +02:00
Jean CASPAR
1382d307d3 Migrate ast_lowering::expr to SessionDiagnostic 2022-08-22 19:21:39 +02:00
Jean CASPAR
0043d10c71 Migrate ast_lowering::lib and ast_lowering::item to SessionDiagnostic 2022-08-22 19:19:59 +02:00
Jean CASPAR
73ae38bac1 Migrate ast_lowering::path to SessionDiagnostic 2022-08-22 19:19:58 +02:00
nidnogg
5101688d4f Addressed trailing newlines, odd whitespace skipped by x.py fmt 2022-08-22 12:38:16 -03:00
Peter Medus
8c2413c4c6 Migrate rustc_plugin_impl to SessionDiagnostic 2022-08-22 16:35:05 +01:00
nidnogg
649749c7b0 Addressing last comment on PR review 2022-08-22 12:14:49 -03:00
Dylan DPC
75b7089d1e
Rollup merge of #100713 - Xiretza:parser-expr-session-diagnostics, r=estebank
Convert diagnostics in parser/expr to SessionDiagnostic

This migrates all the easy cases in `rustc_parse::parser::expr` to `SessionDiagnostic`s, I've left things such as `multipart_suggestion`s out for now in the hopes of a derive API being developed soon.
2022-08-22 20:34:14 +05:30
Giacomo Stevanato
217a11bdb1 Prefix fluent resources with interface_ 2022-08-22 14:59:41 +02:00
Rejyr
1974186d32 migrate: rustc_lint::context 2022-08-22 08:24:14 -04:00
Rejyr
dbe838079c rename: UnknownTool to UnknownToolInScopedLint 2022-08-22 08:24:14 -04:00
Rejyr
7a6ae2367d migrate: OverruledAttribute 2022-08-22 08:24:14 -04:00
Rejyr
874a79fae3 migrate: bad_attr to SessionDiagnostic 2022-08-22 08:24:14 -04:00
Rejyr
d197c1eb5b migrate: UnknownTool error to SessionDiagnostic 2022-08-22 08:24:14 -04:00
Giacomo Stevanato
b411adec2a Move rustc_interface diagnostics to struct SessionDiagnostic derives 2022-08-22 13:22:00 +02:00
Xiretza
c9b1a5874d fluent: mandate slug names to be prefixed by crate name 2022-08-22 08:42:44 +02:00
Dylan DPC
57e521e0e5
Rollup merge of #100694 - finalchild:ast-passes-diag, r=TaKO8Ki
Migrate rustc_ast_passes diagnostics to `SessionDiagnostic` and translatable messages (first part)

Doing a full migration of the `rustc_ast_passes` crate.
Making a draft here since there's not yet a tracking issue for the migrations going on.

`@rustbot` label +A-translation
2022-08-22 11:45:44 +05:30
bors
d0ea1d7679 Auto merge of #100671 - Xiretza:tidy-fluent-files, r=davidtwco
tidy: check fluent files for style

Inspired by https://github.com/rust-lang/rust/pull/100651#discussion_r947600576

There were a lot of line length violations, so I've excepted that lint - I'm not sure if fluent files can be formatted to avoid long lines at all.
2022-08-22 03:02:50 +00:00
nidnogg
0a58b26e8a Hotfix ftl err name, added check for err.code in create_feature_err 2022-08-21 23:22:55 -03:00
nidnogg
4c82845b3a Fixed failing tests (missing labels), added automatic error code in create_feature_err() builder 2022-08-21 23:22:55 -03:00
nidnogg
d1f14ee1b0 Added several more migrations under ops.rs, failing some tests though 2022-08-21 23:22:54 -03:00
nidnogg
33e8aaf830 Migration on ops.rs for unstable const functions 2022-08-21 23:22:53 -03:00
nidnogg
70ea98633e Migrated Unallowed function pointer calls in interpreter/ops 2022-08-21 23:22:51 -03:00
nidnogg
6af8e46a9a Finished const_eval module migration, moving onto sibling folders 2022-08-21 23:22:50 -03:00
finalchild
e331ae57df Migrate forbidden_default and *_without_body 2022-08-22 01:11:59 +09:00
finalchild
bfefefbcfa Migrate fn_param_forbidden_self and rename others to have prefix fn_param_ 2022-08-22 00:57:22 +09:00
finalchild
07e0bc9600 Rename c_var_args_without_named_arg to c_var_args_is_sole_param 2022-08-22 00:57:22 +09:00
finalchild
c6903c04b1 Migrate doc_comment_on_fn_param, forbidden_attr_on_fn_param 2022-08-22 00:57:21 +09:00
finalchild
269c85390c Migrate forbidden_lifetime_bound, forbidden_non_lifetime_param, too_many_params, c_var_args_without_named_arg, c_var_args_not_last 2022-08-22 00:57:21 +09:00
finalchild
8d042f4483 Migrate trait_fn_const 2022-08-22 00:57:21 +09:00
finalchild
e3d4c4039a Migrate trait_fn_async 2022-08-22 00:57:21 +09:00
finalchild
e144a2367a Migrate deprecated_where_clause_location, forbidden_assoc_constraint, keyword_lifetime, invalid_label, invalid_visibility 2022-08-22 00:57:21 +09:00
finalchild
d6fdf14eb7 Migrate forbidden_let 2022-08-22 00:57:21 +09:00