about summary refs log tree commit diff
path: root/compiler/rustc_error_messages
AgeCommit message (Collapse)AuthorLines
2022-11-11Auto merge of #104293 - Manishearth:rollup-xj92d0k, r=Manishearthbors-0/+53
Rollup of 8 pull requests Successful merges: - #95292 (Allow specialized const trait impls.) - #100386 (Make `Sized` coinductive, again) - #102215 (Implement the `+whole-archive` modifier for `wasm-ld`) - #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code) - #103531 (Suggest calling the instance method of the same name when method not found) - #103960 (piece of diagnostic migrate) - #104051 (update Miri) - #104129 (rustdoc: use javascript to layout notable traits popups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-11Rollup merge of #103960 - AndyJado:var_path_only_diag, r=davidtwcoManish Goregaokar-0/+53
piece of diagnostic migrate r? `@davidtwco`
2022-11-11Rollup merge of #104217 - Nilstrieb:funny-dollar-syntax, r=TaKO8KiDylan DPC-1/+2
Display help message when fluent arg was referenced incorrectly The fluent argument syntax is a little special and easy to get wrong, so we emit a small help message when someone gets it wrong. Example: ``` parser_mismatched_closing_delimiter = mismatched closing delimiter: `${delimiter}` ``` panics with ``` thread 'rustc' panicked at 'Encountered errors while formatting message for `parser_mismatched_closing_delimiter` help: Argument `delimiter` exists but was not referenced correctly. Try using `{$delimiter}` instead attr: `None` args: `FluentArgs([("delimiter", String("}"))])` errors: `[ResolverError(Reference(Message { id: "delimiter", attribute: None }))]`', compiler/rustc_errors/src/translation.rs:123:21 ``` fixes #103539
2022-11-11Rollup merge of #104216 - Nilstrieb:dont-ice-invalid-operator-traits, r=estebankDylan DPC-0/+3
Don't ICE on operator trait methods with generic methods Emit a fatal error instead. fixes #104213
2022-11-10Auto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, ↵bors-0/+4
r=jackh276,davidtwco Recover from common if let syntax mistakes/typos Fixes #103587
2022-11-09Display help message when fluent arg was referenced incorrectlyNilstrieb-1/+2
The fluent argument syntax is a little special and easy to get wrong, so we emit a small help message when someone gets it wrong. Example: ``` parser_mismatched_closing_delimiter = mismatched closing delimiter: `${delimiter}` ``` panics with ``` thread 'rustc' panicked at 'Encountered errors while formatting message for `parser_mismatched_closing_delimiter` help: Argument `delimiter` exists but was not referenced correctly. Try using `{$delimiter}` instead attr: `None` args: `FluentArgs([("delimiter", String("}"))])` errors: `[ResolverError(Reference(Message { id: "delimiter", attribute: None }))]`', compiler/rustc_errors/src/translation.rs:123:21 ```
2022-11-09Don't ICE on operator trait methods with generic methodsNilstrieb-0/+3
Emit a fatal error instead.
2022-11-09Use `LayoutError`'s implementation of `IntoDiagnostic`SLASHLogin-3/+0
2022-11-09Simplify existing Diagnostic implementationsSLASHLogin-11/+6
2022-11-09Port diagnostics created by `Handler`SLASHLogin-0/+7
2022-11-09Correct tests to match errorsSLASHLogin-1/+1
2022-11-09Fix CISLASHLogin-1/+1
Add missing 'the' to the error en-US translation
2022-11-09Port `MissingFeatures` and `TargetFeatureDisableOrEnable`SLASHLogin-0/+6
2022-11-09Port `UnknownArchiveKind`SLASHLogin-0/+3
2022-11-09Port `DlltoolFailImportLibrary` and implement `IntoDiagnosticArg` for ↵SLASHLogin-0/+3
`Cow<'a, str>`
2022-11-09Port ErrorCallingDllToolSLASHLogin-0/+3
2022-11-09Import ErrorWritingDEFFileSLASHLogin-0/+3
2022-11-09Port ArchiveBuildFailureSLASHLogin-0/+3
2022-11-09Port SanitizerMemtagRequiresMteSLASHLogin-0/+3
2022-11-09Port LinkageConstOrMutType errorSLASHLogin-0/+3
2022-11-09Port InvalidMinimumAlignmentSLASHLogin-0/+3
2022-11-09Port layout size overflowSLASHLogin-0/+3
2022-11-09FormattingSLASHLogin-1/+1
2022-11-09Port branch protection on aarch64SLASHLogin-0/+3
2022-11-09Port `symbol_already_defined` errorSLASHLogin-0/+3
2022-11-09Port Instrument coverage requires llvm 12 to the new structSLASHLogin-0/+3
2022-11-09Import `error creating import library`SLASHLogin-0/+3
2022-11-09Trailing whitespacesSLASHLogin-3/+3
2022-11-09locales formattingSLASHLogin-1/+1
2022-11-09Port unknown feature diagnostic to the new frameworkSLASHLogin-0/+15
2022-11-09struct error E0505AndyJado-0/+14
2022-11-09var_subdiag refinementAndyJado-0/+15
trim old
2022-11-09remove old var_span_path_onlyAndyJado-0/+24
doc comment
2022-11-08Rollup merge of #103559 - AndyJado:var_span_label, r=davidtwcoManish Goregaokar-0/+12
first move on a nested span_label trying not to be smart this time.
2022-11-08use subdiagnostic for sugesting add letyukang-0/+1
2022-11-08fix #103587, Recover from common if let syntax mistakes/typosyukang-0/+3
2022-11-06Rollup merge of #103012 - chenyukang:fix-102806, r=davidtwco,compiler-errorsMatthias Krüger-0/+3
Suggest use .. to fill in the rest of the fields of Struct Fixes #102806
2022-11-05first move on a nested span_labelAndyJado-0/+12
Apply suggestions from code review Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2022-11-05Specify that `break` cannot be used outside of loop *or* labeled blockclubby789-2/+8
2022-11-04Rollup merge of #103792 - ↵Matthias Krüger-0/+63
JhonnyBillM:migrate-codegen-ssa-to-diagnostics-structs-pt2, r=davidtwco Migrate `codegen_ssa` to diagnostics structs - [Part 2] Completes migrating `link.rs` in `codegen_ssa` module. _Part 1 - https://github.com/rust-lang/rust/pull/102612_ r? `@davidtwco`
2022-11-04Rollup merge of #103397 - crlf0710:port_dead_code_lint, r=davidtwcoMatthias Krüger-0/+33
Port `dead_code` lints to be translatable. This adds an additional comma to lists with three or more items, to be consistent with list formatters like `icu4x`. r? `@davidtwco`
2022-11-04FIX - Migrate missing errors in link.rsJhonny Bill Mena-0/+4
2022-11-04ADD - ExtractBundledLibsError. Migrated extract_bundled_libs to translatable ↵Jhonny Bill Mena-0/+8
diagnostics
2022-11-04UPDATE - Complete link.rs migration to new diagnostics infraestructureJhonny Bill Mena-0/+51
2022-11-04fix #102806, suggest use .. to fill in the rest of the fields of Structyukang-0/+3
2022-11-04Use `derive(Subdiagnostic)` for `ChangeFieldsToBeOfUnitType`.Charles Lew-2/+1
2022-11-01Rollup merge of #103061 - Amanieu:rewrite_alloc_error_handler, r=bjorn3Dylan DPC-6/+16
Rewrite implementation of `#[alloc_error_handler]` The new implementation doesn't use weak lang items and instead changes `#[alloc_error_handler]` to an attribute macro just like `#[global_allocator]`. The attribute will generate the `__rg_oom` function which is called by the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom` function is defined in any crate then the compiler shim will call `__rdl_oom` in the alloc crate which will simply panic. This also fixes link errors with `-C link-dead-code` with `default_alloc_error_handler`: `__rg_oom` was previously defined in the alloc crate and would attempt to reference the `oom` lang item, even if it didn't exist. This worked as long as `__rg_oom` was excluded from linking since it was not called. This is a prerequisite for the stabilization of `default_alloc_error_handler` (#102318).
2022-11-01Rollup merge of #103772 - compiler-errors:better-strict-coherence-err, ↵Yuki Okushi-0/+4
r=davidtwco better error for `rustc_strict_coherence` misuse Fixes #103753
2022-10-31Rewrite implementation of `#[alloc_error_handler]`Amanieu d'Antras-6/+16
The new implementation doesn't use weak lang items and instead changes `#[alloc_error_handler]` to an attribute macro just like `#[global_allocator]`. The attribute will generate the `__rg_oom` function which is called by the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom` function is defined in any crate then the compiler shim will call `__rdl_oom` in the alloc crate which will simply panic. This also fixes link errors with `-C link-dead-code` with `default_alloc_error_handler`: `__rg_oom` was previously defined in the alloc crate and would attempt to reference the `oom` lang item, even if it didn't exist. This worked as long as `__rg_oom` was excluded from linking since it was not called. This is a prerequisite for the stabilization of `default_alloc_error_handler` (#102318).
2022-10-30better error for rustc_strict_coherence misuseMichael Goulet-0/+4