about summary refs log tree commit diff
path: root/compiler/rustc_error_messages
AgeCommit message (Collapse)AuthorLines
2022-10-07always put ftl message on next line, resolve all but 1 output comparison errorNathan Stocks-89/+180
2022-10-07Migrate InvalidAttrAtCrateLevelrdvdev2-0/+3
Co-authored-by: Nathan Stocks <cleancut@github.com> Co-authored-by: rdvdev2 <rdvdev2@gmail.com>
2022-10-07Migrate derivable diagnostics in check_attr.rsrdvdev2-0/+2
2022-10-07Migrate derivable diagnostics in lang_items.rsrdvdev2-0/+8
2022-10-07Migrate weak_lang_items.rsrdvdev2-0/+9
2022-10-07ADD - implement IntoDiagnostic for thorin::Error wrapperJhonny Bill Mena-3/+76
2022-10-07Address PR commentsJhonny Bill Mena-8/+2
- UPDATE - revert migration of logs - UPDATE - use derive on LinkRlibError enum - [Gardening] UPDATE - alphabetically sort fluent_messages - UPDATE - use PathBuf and unify both AddNativeLibrary to use Display (which is what PathBuf uses when conforming to IntoDiagnosticArg) - UPDATE - fluent messages sort after rebase
2022-10-07ADD - initial port of link.rsJhonny Bill Mena-0/+25
2022-10-07DELETE - unused error after PR# 100101 was mergedJhonny Bill Mena-2/+0
2022-10-07UPDATE - migrate write.rs to new diagnostics infraJhonny Bill Mena-0/+8
2022-10-07UPDATE - migrate linker.rs to new diagnostics infraJhonny Bill Mena-0/+18
2022-10-07UPDATE - LibDefWriteFailure to accept type instead of formatted stringJhonny Bill Mena-1/+1
This follows team’s suggestions in this thread https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20diag.20translation/near/295305249
2022-10-07ADD - migrate lib.def write fatal errorJhonny Bill Mena-0/+2
This diagnostic has no UI test 🤔 Should we add some? If so, how?
2022-10-07ADD - codegen_ssa initial diags translations machineryJhonny Bill Mena-0/+2
ADD - migrate MissingNativeStaticLibrary fatal error
2022-10-06Rollup merge of #102718 - compiler-errors:opaque-bound-lint-ice, r=fee1-deadMatthias Krüger-1/+2
Fix `opaque_hidden_inferred_bound` lint ICE Fixes #102705
2022-10-06Auto merge of #99324 - reez12g:issue-99144, r=jyn514bors-1/+0
Enable doctests in compiler/ crates Helps with https://github.com/rust-lang/rust/issues/99144
2022-10-05Fix opaque_hidden_inferred_bound lint ICEMichael Goulet-1/+2
2022-10-04find the correct lang item for rangesyukang-2/+1
2022-10-04Rollup merge of #102568 - compiler-errors:lint-unsatisfied-opaques, r=oli-obkDylan DPC-0/+4
Lint against nested opaque types that don't satisfy associated type bounds See the test failures for examples of places where this lint would fire. r? `@oli-obk`
2022-10-04fix #102396, suggest parentheses for possible range methodsyukang-0/+5
2022-10-04Auto merge of #102395 - davidtwco:translation-rename-typeck, r=compiler-errorsbors-39/+45
errors: rename `typeck.ftl` to `hir_analysis.ftl` In #102306, `rustc_typeck` was renamed to `rustc_hir_analysis` but the diagnostic resources were not renamed - which is what this pull request changes.
2022-10-03Add diagnostic struct for const eval error in `rustc_middle`pierwill-0/+3
Co-authored-by: Michael Goulet <michael@errs.io>
2022-10-03errors: rename `typeck.ftl` to `hir_analysis.ftl`David Wood-39/+45
In #102306, `rustc_typeck` was renamed to `rustc_hir_analysis` but the diagnostic resources were not renamed - which is what this commit changes. Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-02Make it a lint for all opaque typesMichael Goulet-1/+1
2022-10-02Lint for unsatisfied nested opaquesMichael Goulet-0/+4
2022-10-01Auto merge of #101986 - WaffleLapkin:move_lint_note_to_the_bottom, r=estebankbors-0/+11
Move lint level source explanation to the bottom So, uhhhhh r? `@estebank` ## User-facing change "note: `#[warn(...)]` on by default" and such are moved to the bottom of the diagnostic: ```diff - = note: `#[warn(unsupported_calling_conventions)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #87678 <https://github.com/rust-lang/rust/issues/87678> + = note: `#[warn(unsupported_calling_conventions)]` on by default ``` Why warning is enabled is the least important thing, so it shouldn't be the first note the user reads, IMO. ## Developer-facing change `struct_span_lint` and similar methods have a different signature. Before: `..., impl for<'a> FnOnce(LintDiagnosticBuilder<'a, ()>)` After: `..., impl Into<DiagnosticMessage>, impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>) -> &'b mut DiagnosticBuilder<'a, ()>` The reason for this is that `struct_span_lint` needs to edit the diagnostic _after_ `decorate` closure is called. This also makes lint code a little bit nicer in my opinion. Another option is to use `impl for<'a> FnOnce(LintDiagnosticBuilder<'a, ()>) -> DiagnosticBuilder<'a, ()>` altough I don't _really_ see reasons to do `let lint = lint.build(message)` everywhere. ## Subtle problem By moving the message outside of the closure (that may not be called if the lint is disabled) `format!(...)` is executed earlier, possibly formatting `Ty` which may call a query that trims paths that crashes the compiler if there were no warnings... I don't think it's that big of a deal, considering that we move from `format!(...)` to `fluent` (which is lazy by-default) anyway, however this required adding a workaround which is unfortunate. ## P.S. I'm sorry, I do not how to make this PR smaller/easier to review. Changes to the lint API affect SO MUCH 😢
2022-10-01Refactor rustc lint APIMaybe Waffle-0/+11
2022-09-30Rollup merge of #101075 - ellishg:rustc_codegen_gcc_diagnostics, r=davidtwcoMatthias Krüger-0/+69
Migrate rustc_codegen_gcc to SessionDiagnostics As part of #100717 this pr migrates diagnostics to `SessionDiagnostics` for the `rustc_codegen_gcc` crate. ``@rustbot`` label +A-translation
2022-09-29Remove from compiler/ cratesreez12g-1/+0
2022-09-29improve E0585 helpRageking8-1/+1
2022-09-27Implement IntoDiagnosticArg for rustc_ast::token::Token(Kind)Xiretza-10/+10
2022-09-27Don't unnecessarily stringify paths in diagnosticsXiretza-4/+4
2022-09-27Migrate even more diagnostics in rustc_parse to diagnostic structsXiretza-0/+53
2022-09-27Migrate "expected semicolon" diagnostics to diagnostic structsXiretza-0/+10
2022-09-27Migrate "expected identifier" diagnostics to diagnostic structsXiretza-0/+16
2022-09-27Rework "inner attribute not permitted" errorsXiretza-0/+28
2022-09-27Migrate more rustc_parse diagnostics to diagnostic structsXiretza-1/+32
2022-09-27Migrate "invalid literal suffix" diagnostic to diagnostic structsXiretza-0/+9
2022-09-27Migrate more diagnostics in rustc_parse to diagnostic structsXiretza-0/+61
2022-09-27Migrate rustc_session::expr_parentheses_needed to Subdiagnostic structXiretza-0/+2
2022-09-26lint and remove unused diagnosticEllis Hoag-3/+0
2022-09-25Recover some items that expect braces and don't take semicolonsMichael Goulet-0/+3
2022-09-24Add monomorphization errorsEllis Hoag-0/+57
2022-09-24Add LayoutSizeOverflowEllis Hoag-0/+3
2022-09-24Add LTONotSupportedEllis Hoag-0/+3
2022-09-24Add UnwindingInlineAsmEllis Hoag-1/+4
2022-09-24Add LinkageConstOrMutTypeEllis Hoag-0/+3
2022-09-24Add RanlibFailureEllis Hoag-0/+3
2022-09-23Auto merge of #102165 - matthiaskrgr:rollup-n5oquhe, r=matthiaskrgrbors-0/+3
Rollup of 8 pull requests Successful merges: - #100734 (Split out async_fn_in_trait into a separate feature) - #101664 (Note if mismatched types have a similar name) - #101815 (Migrated the rustc_passes annotation without effect diagnostic infrastructure) - #102042 (Distribute rust-docs-json via rustup.) - #102066 (rustdoc: remove unnecessary `max-width` on headers) - #102095 (Deduplicate two functions that would soon have been three) - #102104 (Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests) - #102112 (Allow full relro on powerpc64-unknown-linux-gnu) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-23Rollup merge of #101815 - diegooliveira:master, r=davidtwcoMatthias Krüger-0/+3
Migrated the rustc_passes annotation without effect diagnostic infrastructure Small change to move the validation for annotations to the new diagnostic infrastructure.