summary refs log tree commit diff
path: root/compiler/rustc_error_messages/src
AgeCommit message (Collapse)AuthorLines
2022-09-06Rollup merge of #101021 - MingyuChen1:diagnostic, r=davidtwcoDylan DPC-0/+1
Migrate ``rustc_middle`` diagnostic Part of #100717
2022-09-03Rollup merge of #100928 - CleanCut:rustc_metadata_diagnostics, r=davidtwcoDylan DPC-0/+1
Migrate rustc_metadata to SessionDiagnostics Migrate rustc_metadata to SessionDiagnostics. Part of https://github.com/rust-lang/rust/issues/100717
2022-09-02Rollup merge of #100814 - gabrielBusta:port_trait_selection_diagnostics, ↵Matthias Krüger-0/+1
r=davidtwco Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1 ``@rustbot`` label +A-translation r? rust-lang/diagnostics cc #100717
2022-09-01Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1Gabriel Bustamante-0/+1
2022-09-01Migrate DropCheckOverflow111-0/+1
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/+1
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-31set up rustc_metadata for SessionDiagnostics, port dependency_format.rsNathan Stocks-0/+1
2022-08-31Rollup merge of #100831 - ↵Ralf Jung-0/+1
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/+1
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/+1
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/+1
2022-08-31migrate rustc_query_system to use SessionDiagnosticYuanheng Li-0/+1
with manual impl SessionDiagnostic
2022-08-30ADD - InvalidSymbolName to migrate symbol-name({}) error to new diagnostics ↵Jhonny Bill Mena-0/+1
infraestructure ADD - dependencies needed to port a module to new Diagnostics infra (rustc_macros, rustc_errors, errors file, and fluent file)
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/+1
Migrate part of rustc_infer to session diagnostic
2022-08-26Rollup merge of #100890 - adriantombu:migrate_diagnostic_rustc_driver, ↵Michael Goulet-0/+1
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/+1
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 #100744 - 5225225:migrate-rustc-mir-dataflow, r=davidtwcoMichael Goulet-0/+1
Migrate rustc_mir_dataflow to diagnostic structs
2022-08-26Rollup merge of #100735 - Facel3ss1:ty-utils-translation, r=davidtwcoMichael Goulet-0/+1
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/+1
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 the file cgu_reuse_trackerLuis Cardoso-0/+1
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/+1
2022-08-25rebased: convert rustc_monomorphize errors to SessionDiagnosticNathan Stocks-0/+1
2022-08-25Replace spaghetti with a simple errors enumAdrian Tombu-1/+0
2022-08-25Start adding enum errors for deserialize_rlinkAdrian Tombu-0/+1
2022-08-25Start moving rustc_driver to SessionDiagnosticAdrian Tombu-0/+1
2022-08-24save_analysis: Migrate diagnosticsWonchul Lee-0/+1
2022-08-23Rename rustc_mir_dataflow diagnostic to mir_dataflow5225225-1/+1
2022-08-23Migrate OpaqueHiddenType, E0282, E0283, E0284, E0698Nikita Tomashevich-0/+1
2022-08-23Migrate rustc_mir_dataflow to diagnostic structs5225225-0/+1
2022-08-22Refactor diagnostics in `handle_errors` functionHampus Lidin-0/+1
2022-08-22Migrate ast_lowering::path to SessionDiagnosticJean CASPAR-0/+1
2022-08-22Migrate rustc_plugin_impl to SessionDiagnosticPeter Medus-0/+1
2022-08-22Migrate forbidden_letfinalchild-0/+1
2022-08-18Add diagnostic translation lints to crates that don't emit them5225225-0/+2
2022-08-17Migrate emoji identifier diagnostics to `SessionDiagnostic`finalchild-0/+1
2022-08-12Adjust cfgsMark Rousskov-1/+0
2022-07-20clippy::perf fixesMatthias Krüger-1/+1
2022-07-16Stabilize `let_chains`Caio-1/+1
2022-07-15passes: migrate half of `check_attr`David Wood-0/+1
Migrate half of the `rustc_passes::check_attr` diagnostics to using diagnostic derives and being translatable.
2022-07-10use subdiagnostic for messageMichael Goulet-1/+2
2022-07-08Migrate unstable-in-stable diagnosticMichael Goulet-0/+1
2022-06-30lint: port array-into-iter diagnosticsDavid Wood-2/+3
Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-28Migrate some rustc_borrowck diagnostics to SessionDiagnosticMichael Goulet-0/+1
2022-06-27privacy: port "field is private" diagDavid Wood-0/+1
Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-24errors: remove diagnostic message ctorsDavid Wood-17/+0
Now that typed identifiers are used in both derives, constructors for the `DiagnosticMessage` and `SubdiagnosticMessage` types are not required. Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-24macros: use typed identifiers in subdiag deriveDavid Wood-0/+21
As in the diagnostic derive, using typed identifiers in the subdiagnostic derive improves the diagnostics of using the subdiagnostic derive as Fluent messages will be confirmed to exist at compile-time. Signed-off-by: David Wood <david.wood@huawei.com>
2022-06-21Migrate `builtin-macros-requires-cfg-pattern` to `SessionDiagnostic`beetrees-0/+1
2022-06-20Rollup merge of #97912 - Kixunil:stabilize_path_try_exists, r=dtolnayYuki Okushi-1/+0
Stabilize `Path::try_exists()` and improve doc This stabilizes the `Path::try_exists()` method which returns `Result<bool, io::Error>` instead of `bool` allowing handling of errors unrelated to the file not existing. (e.g permission errors) Along with the stabilization it also: * Warns that the `exists()` method is error-prone and suggests to use the newly stabilized one. * Suggests it instead of `metadata()` to handle errors. * Mentions TOCTOU bugs to avoid false assumption that `try_exists()` is completely safe fixed version of `exists()`. * Renames the feature of still-unstable `std::fs::try_exists()` to `fs_try_exists` to avoid name conflict. The tracking issue #83186 remains open to track `fs_try_exists`.