summary refs log tree commit diff
path: root/compiler/rustc_error_messages
AgeCommit message (Collapse)AuthorLines
2022-10-04Add AscribeUserTypeProvePredicateJack Huey-0/+1
(cherry picked from commit 9929c0ac76bbbe2b3b8a0c28df91310067ae57fa)
2022-09-16Rollup merge of #101782 - ↵Michael Howell-7/+1
JhonnyBillM:refactor-symbol-mangling-diags-migration, r=davidtwco Update `symbol_mangling` diagnostics migration Addresses comments raised in #100831. r? `@eddyb` `@davidtwco`
2022-09-16Revert "Better errors for implied static bound"Jack Huey-1/+0
This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.
2022-09-13Better errors for implied static boundJack Huey-0/+1
2022-09-13Rollup merge of #101266 - LuisCardosoOliveira:translation-rustcsession-pt3, ↵Matthias Krüger-0/+10
r=davidtwco translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final # Description This is the final part of the rustc_session https://github.com/rust-lang/rust/issues/100717#issuecomment-1220279883. Please only review this [commit](https://github.com/rust-lang/rust/pull/101266/commits/a54534703774bfb9fc344f61d511760a7c43fe94). The other ones are from the PR https://github.com/rust-lang/rust/pull/101041# that is not yet merged. In this PR, we migrate the file `output.rs`
2022-09-13UPDATE - merge and avoid translations for symbol mangling test outputJhonny Bill Mena-7/+1
2022-09-13Auto merge of #100101 - BelovDV:issue-99429, r=petrochenkovbors-0/+3
change rlib format to distinguish native dependencies Another one method to solve problem mentioned in #99429. Changed .rlib format, it contains all bundled native libraries as archieves. At link time rlib is unpacked and native dependencies linked separately. New behavior hidden under separate_native_rlib_dependencies flag.
2022-09-13Auto merge of #99556 - davidtwco:collapse-debuginfo, r=wesleywiserbors-0/+3
ssa: implement `#[collapse_debuginfo]` cc #39153 rust-lang/compiler-team#386 Debuginfo line information for macro invocations are collapsed by default - line information are replaced by the line of the outermost expansion site. Using `-Zdebug-macros` disables this behaviour. When the `collapse_debuginfo` feature is enabled, the default behaviour is reversed so that debuginfo is not collapsed by default. In addition, the `#[collapse_debuginfo]` attribute is available and can be applied to macro definitions which will then have their line information collapsed. r? rust-lang/wg-debugging
2022-09-12change rlib format to discern native dependenciesDaniil Belov-0/+3
2022-09-10translations(rustc_session): migrate output.rsLuis Cardoso-0/+10
2022-09-09Make async fn in traits workMichael Goulet-6/+6
2022-09-08Rollup merge of #101515 - chenyukang:fix-101477, r=fee1-deadDylan DPC-0/+3
Recover from typo where == is used in place of = Fixes #101477
2022-09-08Rollup merge of #101041 - ↵Dylan DPC-0/+42
LuisCardosoOliveira:translation-rename-attr-warning-pt2, r=davidtwco translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2 # Description This is the second part of the `rustc_session` [migration](https://github.com/rust-lang/rust/issues/100717#issuecomment-1220279883). **Please only review this [commit](https://github.com/rust-lang/rust/pull/101041/commits/501858195734ec77f6b121ef753b03c40645df23) that belongs to the part 2. The other ones are from the PR [#100753](https://github.com/rust-lang/rust/pull/100753) that is not yet merged.** In this PR, we migrate the files `session.rs` and `config.rs`. Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
2022-09-08translations(rustc_session): migrates two diagnostics in session.rsLuis Cardoso-2/+4
2022-09-08fixes #101477: Recover from typo where == is used in place of =yukang-0/+3
2022-09-08translations(rustc_session): remove lint allow rule to the methods marked ↵Luis Cardoso-4/+4
with rustc_lint_diagnostic This commit removes the allows rules for the SessionDiagnostic lint that were being used in the session.rs file. Thanks to the PR #101230 we do not need to annotate the methods with the allow rule as they are part of the diagnostic machinery.
2022-09-08translations(rustc_session): migrate TargetDataLayout::parseLuis Cardoso-0/+14
2022-09-08translations(rustc_session): migrates session.rs and config.rsLuis Cardoso-0/+26
2022-09-07ssa: implement `#[collapse_debuginfo]`David Wood-0/+3
Debuginfo line information for macro invocations are collapsed by default - line information are replaced by the line of the outermost expansion site. Using `-Zdebug-macros` disables this behaviour. When the `collapse_debuginfo` feature is enabled, the default behaviour is reversed so that debuginfo is not collapsed by default. In addition, the `#[collapse_debuginfo]` attribute is available and can be applied to macro definitions which will then have their line information collapsed. Signed-off-by: David Wood <david.wood@huawei.com>
2022-09-06Mugrate mismatched_static_lifetime.rsNikita Tomashevich-0/+31
2022-09-06Migrate E0623Nikita Tomashevich-2/+29
2022-09-06Auto merge of #101479 - Dylan-DPC:rollup-v8ite0y, r=Dylan-DPCbors-0/+18
Rollup of 5 pull requests Successful merges: - #100658 (TyCtxt::get_attr should check that no duplicates are allowed) - #101021 (Migrate ``rustc_middle`` diagnostic) - #101287 (Document eager evaluation of `bool::then_some` argument) - #101412 (Some more cleanup in `core`) - #101427 (Fix ICE, generalize 'move generics to trait' suggestion for >0 non-rcvr arguments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-06Rollup merge of #101021 - MingyuChen1:diagnostic, r=davidtwcoDylan DPC-0/+18
Migrate ``rustc_middle`` diagnostic Part of #100717
2022-09-06Auto merge of #101362 - compiler-errors:unnecessary-let, r=cjgillotbors-0/+3
Suggest removing unnecessary prefix let in patterns Helps with #101291, though I think `@estebank` probably wants this: > Finally, I think it'd be nice if we could detect that we don't know for sure and "just" swallow the rest of the expression (find the next ; accounting for nested braces) or the end of the item (easier). ... to be implemented before we close that issue out completely.
2022-09-05fix comment111-1/+1
2022-09-03Auto merge of #100574 - Urgau:check-cfg-warn-cfg, r=petrochenkovbors-0/+6
Add warning against unexpected --cfg with --check-cfg This PR adds a warning when an unexpected `--cfg` is specified but not in the specified list of `--check-cfg`. This is the follow-up PR I mentioned in https://github.com/rust-lang/rust/pull/99519. r? `@petrochenkov`
2022-09-03Suggest removing unnecessary prefix let in patternsMichael Goulet-0/+3
2022-09-03Rollup merge of #100928 - CleanCut:rustc_metadata_diagnostics, r=davidtwcoDylan DPC-0/+273
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/+27
r=davidtwco Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1 ``@rustbot`` label +A-translation r? rust-lang/diagnostics cc #100717
2022-09-02Add warning against unexpected --cfg with --check-cfgUrgau-0/+6
2022-09-02Rollup merge of #100147 - Bryanskiy:private-in-public, r=petrochenkovGuillaume Gomez-0/+2
optimization of access level table construction Refactoring which was mentioned in #87487
2022-09-01Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1Gabriel Bustamante-0/+27
2022-09-01Migrate limit error111-0/+4
2022-09-01Migrate OpaqueHiddenType mismatch111-0/+10
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