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
Luis Cardoso
2c77f3e9c5
translations(rustc_session): migrate check_expected_reuse
...
This commit migrates the errors in the function check_expected_reuse
to use the new SessionDiagnostic. It also does some small refactor
for the IncorrectCguReuseType to include the 'at least' word in the
fluent translation file
2022-08-26 16:10:11 +02:00
Luis Cardoso
d5262a9452
translations(rustc_session): migrate 80% of the file parse.rs
...
This commit migrates around 80% of the parse file to use SsessionDiagnostic
We still have to migrate struct_err and struct_warn.
2022-08-26 16:10:11 +02:00
Luis Cardoso
706452eba7
translations(rustc_session): migrate the file cgu_reuse_tracker
...
This commit migrates the errors that indicates an incorrect
CGU type and the fatal error that indicates that a CGU has
not been correctly recorded
2022-08-26 16:10:11 +02:00
Peter Medus
01c1616b25
Migrate rustc_ty_utils to use SessionDiagnostic
2022-08-26 14:36:51 +01:00
AndyJado
622217da59
diag-mig
2022-08-26 10:32:59 +08:00
Nathan Stocks
30c7506655
allow non-monomorphize modules to access hard-coded error message through new struct, use fluent message in monomorphize
2022-08-25 11:06:45 -06:00
Nathan Stocks
40f44736e8
replace some usages of [Span]FatalError with error-specific types
2022-08-25 11:06:45 -06:00
Nathan Stocks
137f20c112
rebased: convert rustc_monomorphize errors to SessionDiagnostic
2022-08-25 11:06:32 -06:00
Adrian Tombu
bf7ce6a1a6
Replace spaghetti with a simple errors enum
2022-08-25 18:06:12 +02:00
Adrian Tombu
3f883b850d
Start adding enum errors for deserialize_rlink
2022-08-25 18:06:12 +02:00
Adrian Tombu
1c575c5fe0
Use std::io::Error and remove useless to_string
2022-08-25 18:06:12 +02:00
Adrian Tombu
dbe39d835e
Start moving rustc_driver to SessionDiagnostic
2022-08-25 18:06:11 +02: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
Nikita Tomashevich
3fae3904b1
Use IntoDiagnosticArg
where it makes sense
2022-08-24 15:46:29 +03: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
Nikita Tomashevich
74f9973824
Fix formating in infer.ftl to make tidy happy
2022-08-23 15:33:06 +03:00
5225225
7f125ed7d5
Remove full stop in diagnostic message
2022-08-23 13:18:45 +01:00
Nikita Tomashevich
f50d1713fd
Migrate note_region_origin function
2022-08-23 14:47:08 +03:00
Nikita Tomashevich
313d474b35
Migrate OpaqueHiddenType, E0282, E0283, E0284, E0698
2022-08-23 14:47:07 +03:00
5225225
ee2b16100e
Migrate rustc_mir_dataflow to diagnostic structs
2022-08-23 11:24:51 +01:00
Hampus Lidin
1c28006bf6
Reorder diagnostics in code order, then alphabetical order
2022-08-22 20:19:19 +02:00
Hampus Lidin
c4f59605d2
Refactor remaining diagnostics
2022-08-22 20:19:19 +02:00
Hampus Lidin
b731bfa2d4
Refactor 'invalid issue' diagnostic to use labels within the same Fluent object
2022-08-22 20:19:19 +02:00
Hampus Lidin
b3be7698d6
Refactor additional diagnostics in rustc_attr
2022-08-22 20:19:19 +02:00
Hampus Lidin
83a724eab5
Refactor more diagnostics in rustc_attr
2022-08-22 20:19:19 +02:00
Hampus Lidin
0005f628f0
Refactor diagnostics in handle_errors
function
2022-08-22 20:19:15 +02: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