about summary refs log tree commit diff
path: root/compiler/rustc_error_messages
AgeCommit message (Collapse)AuthorLines
2022-09-01Migrate DropCheckOverflow111-0/+4
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+3
by module
2022-08-31Rollup merge of #100844 - evopen:migrate-diag, r=davidtwcoMatthias Krüger-0/+26
migrate rustc_query_system to use SessionDiagnostic issues: * variable list is not supported in fluent * ~~cannot have two sub diagnostic with the same tag (eg. 2 .note or 2 .help)~~ allow multiple tag with SessionSubdiagnostic derive
2022-08-31Rollup merge of #100787 - chenyukang:fix-100770-pretty-crash, r=petrochenkovMatthias Krüger-0/+2
Pretty printing give proper error message without panic Fixes #100770
2022-08-31port 5 new diagnostics that appeared in masterNathan Stocks-0/+15
2022-08-31respond to review feedback: mainly eliminate as many conversions as possible...Nathan Stocks-0/+30
- ... when creating diagnostics in rustc_metadata - use the error_code! macro - pass macro output to diag.code() - use fluent from within manual implementation of SessionDiagnostic - emit the untested errors in case they occur in the wild - stop panicking in the probably-not-dead code, add fixme to write test
2022-08-31port of locator.rs to SessionDiagnostics, fix some of the errorsNathan Stocks-0/+55
revealed by tests, manually add a panic to test for dead code
2022-08-31port fs.rs to SessionDiagnosticsNathan Stocks-0/+12
2022-08-31port creader.rs to SessionDiagnosticsNathan Stocks-0/+28
2022-08-31port encoder.rs to SessionDiagnosticsNathan Stocks-0/+9
2022-08-31port native_libs.rs to SessionDiagnosticsNathan Stocks-0/+102
2022-08-31set up rustc_metadata for SessionDiagnostics, port dependency_format.rsNathan Stocks-0/+22
2022-08-31Rollup merge of #100831 - ↵Ralf Jung-0/+8
JhonnyBillM:migrate-symbol-mangling-to-diagnostics-structs, r=davidtwco Migrate `symbol_mangling` module to new diagnostics structs
2022-08-31Rollup merge of #100753 - LuisCardosoOliveira:translation-migrate-session, ↵Ralf Jung-0/+17
r=davidtwco translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1 ## Description This is the first PR for the migration of the module `rustc_session`. You can follow my progress [here](https://github.com/rust-lang/rust/issues/100717#issuecomment-1220279883). The PR migrates the files `cgu_reuse_tracker` and `parse.rs` to use `SessionDiagnostic `.
2022-08-31Rollup merge of #100730 - CleanCut:diagnostics-rustc_monomorphize, r=davidtwcoRalf Jung-0/+27
Migrate rustc_monomorphize to use SessionDiagnostic ### Description - Migrates diagnostics in `rustc_monomorphize` to use `SessionDiagnostic` - Adds an `impl IntoDiagnosticArg for PathBuf` ### TODO / Help! - [x] I'm having trouble figuring out how to apply an optional note. 😕 Help!? - Resolved. It was bad docs. Fixed in https://github.com/rust-lang/rustc-dev-guide/pull/1437/files - [x] `errors:RecursionLimit` should be `#[fatal ...]`, but that doesn't exist so it's `#[error ...]` at the moment. - Maybe I can switch after this is merged in? --> https://github.com/rust-lang/rust/pull/100694 - Or maybe I need to manually implement `SessionDiagnostic` instead of deriving it? - [x] How does one go about converting an error inside of [a call to struct_span_lint_hir](https://github.com/rust-lang/rust/blob/8064a495086c2e63c0ef77e8e82fe3b9b5dc535f/compiler/rustc_monomorphize/src/collector.rs#L917-L927)? - [x] ~What placeholder do you use in the fluent template to refer to the value in a vector? It seems like [this code](https://github.com/rust-lang/rust/blob/0b79f758c9aa6646606662a6d623a0752286cd17/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs#L83-L114) ought to have the answer (or something near it)...but I can't figure it out.~ You can't. Punted.
2022-08-31SessionDiagnostic for QueryOverflow errorLi Yuanheng-1/+3
2022-08-31use derive proc macro to impl SessionDiagnosticYuanheng Li-0/+2
fixes `SessionSubdiagnostic` to accept multiple attributes emitting list of fluent message remains unresolved
2022-08-31migrate rustc_query_system to use SessionDiagnosticYuanheng Li-0/+22
with manual impl SessionDiagnostic
2022-08-31add TestReachabilityVisitorBryanskiy-0/+2
2022-08-31Rollup merge of #101049 - JeanCASPAR:remove-span_fatal-from-ast_lowering, ↵Matthias Krüger-0/+2
r=davidtwco Remove span fatal from ast lowering Now the crate `rustc_ast_lowering` is fully migrated to `SessionDiagnostic`. r? ``@davidtwco``
2022-08-30ADD - migrate InvalidDefPath to new diagnostics infraJhonny Bill Mena-0/+2
2022-08-30ADD - migrate InvalidTraitItem and AltInvalidTraitItem errorsJhonny Bill Mena-0/+4
Thought of doing this by having a struct and an enum with Default and Alt cases, but not sure if we wanted to have the text in code instead of having “demangling()” and “demangling-alt()” in the ftl file. Don’t like the current way of having structs representing the same-ish and using long names to distinguish their expectations, instead of putting this in an enum and handling the different cases inside the type. I am fine with whichever option the team prefers; also understand having them as separate structs keeps it simple.
2022-08-30ADD - InvalidSymbolName to migrate symbol-name({}) error to new diagnostics ↵Jhonny Bill Mena-0/+2
infraestructure ADD - dependencies needed to port a module to new Diagnostics infra (rustc_macros, rustc_errors, errors file, and fluent file)
2022-08-30add UI test for unprettyyukang-0/+2
2022-08-29Migrate stable let_chains error to session diagnosticsNilstrieb-0/+4
2022-08-29Revert let_chains stabilizationNilstrieb-0/+1
This reverts commit 326646074940222d602f3683d0559088690830f4. This is the revert against master, the beta revert was already done in #100538.
2022-08-29Rollup merge of #100843 - IntQuant:issue-100717-infer, r=compiler-errorsMatthias Krüger-0/+113
Migrate part of rustc_infer to session diagnostic
2022-08-27remove span_fatal from ast_loweringJean CASPAR-0/+2
2022-08-26Rollup merge of #100900 - AndyJado:diag-migrate, r=davidtwcoMichael Goulet-0/+42
on `region_errors.rs` `@rustbot` label +A-translation
2022-08-26Rollup merge of #100890 - adriantombu:migrate_diagnostic_rustc_driver, ↵Michael Goulet-0/+12
r=davidtwco Migrate rustc_driver to SessionDiagnostic First timer noob here 👋🏽 I'm having a problem understanding how I can retrieve the span, and how to properly construct the error structs to avoid the current compilation errors. Any help pointing me in the right direction would be much appreciated 🙌🏽
2022-08-26Rollup merge of #100836 - hampuslidin:migrate-attr-crate-diagnostics, ↵Michael Goulet-0/+108
r=davidtwco Migrate `rustc_attr` crate diagnostics Hi! This is my first PR to the rustc project, excited to be part of the development! This PR is part of the diagnostics effort, to make diagnostics translatable. `@rustbot` label +A-translation
2022-08-26Rollup merge of #100776 - Rejyr:diagnostic-migration-rustc-lint, r=davidtwcoMichael Goulet-0/+34
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-26Rollup merge of #100744 - 5225225:migrate-rustc-mir-dataflow, r=davidtwcoMichael Goulet-0/+30
Migrate rustc_mir_dataflow to diagnostic structs
2022-08-26Rollup merge of #100738 - nidnogg:diagnostics_migr_const_eval, r=davidtwcoMichael Goulet-0/+52
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-26Rollup merge of #100735 - Facel3ss1:ty-utils-translation, r=davidtwcoMichael Goulet-0/+48
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-26Rollup merge of #100724 - ↵Michael Goulet-0/+132
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-26translations(rustc_session): migrate check_expected_reuseLuis Cardoso-1/+4
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-26translations(rustc_session): migrate 80% of the file parse.rsLuis Cardoso-3/+11
This commit migrates around 80% of the parse file to use SsessionDiagnostic We still have to migrate struct_err and struct_warn.
2022-08-26translations(rustc_session): migrate the file cgu_reuse_trackerLuis Cardoso-0/+6
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-26Migrate rustc_ty_utils to use SessionDiagnosticPeter Medus-0/+48
2022-08-26diag-migAndyJado-0/+42
2022-08-25allow non-monomorphize modules to access hard-coded error message through ↵Nathan Stocks-0/+3
new struct, use fluent message in monomorphize
2022-08-25replace some usages of [Span]FatalError with error-specific typesNathan Stocks-0/+4
2022-08-25rebased: convert rustc_monomorphize errors to SessionDiagnosticNathan Stocks-0/+20
2022-08-25Replace spaghetti with a simple errors enumAdrian Tombu-11/+7
2022-08-25Start adding enum errors for deserialize_rlinkAdrian Tombu-0/+10
2022-08-25Use std::io::Error and remove useless to_stringAdrian Tombu-1/+1
2022-08-25Start moving rustc_driver to SessionDiagnosticAdrian Tombu-0/+6
2022-08-25Rollup merge of #100808 - SkiFire13:migrate_diagnostics_rustc_interface, ↵Yuki Okushi-0/+37
r=davidtwco Migrate `rustc_interface` diagnostics ``@rustbot`` label +A-translation r? rust-lang/diagnostics cc #100717
2022-08-25Rollup merge of #100780 - wonchulee:translation_save_analysis, r=davidtwcoYuki Okushi-0/+2
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 https://github.com/rust-lang/rust/commit/aa68eb4179881ed25106e675a6a224746f8fad5f, https://github.com/rust-lang/rust/commit/f5219a396083b764f3741e9e105685323a745ce8, https://github.com/rust-lang/rust/commit/7da52f694a4ff7c4b9870415584f2c86cec5ce62 can be removed. (I copied commits from https://github.com/rust-lang/rust/pull/100754)