about summary refs log tree commit diff
path: root/compiler/rustc_infer/messages.ftl
AgeCommit message (Collapse)AuthorLines
2024-07-21Move all error reporting into rustc_trait_selectionMichael Goulet-392/+0
2024-07-17Fix precise capturing suggestion for hidden type when APITs are involvedMichael Goulet-0/+5
2024-07-11Make it translatable tooMichael Goulet-0/+4
2024-05-22Cleanup: Fix up some diagnosticsLeón Orell Valerian Liehr-2/+2
2024-05-17Detect when a lifetime is being reused in suggestionEsteban Küber-1/+4
2024-04-10Use `fn` ptr signature instead of `{closure@..}` in infer errorEsteban Küber-0/+3
When suggesting a type on inference error, do not use `{closure@..}`. Instead, replace with an appropriate `fn` ptr. On the error message, use `short_ty_string` and write long types to disk. ``` error[E0284]: type annotations needed for `Select<{closure@lib.rs:2782:13}, _, Expression<'_>, _>` --> crates/lang/src/parser.rs:41:13 | 41 | let lit = select! { | ^^^ 42 | Token::Int(i) = e => Expression::new(Expr::Lit(ast::Lit::Int(i.parse().unwrap())), e.span()), | ---- type must be known at this point | = note: the full type name has been written to '/home/gh-estebank/iowo/target/debug/deps/lang-e2d6e25819442273.long-type-4587393693885174369.txt' = note: cannot satisfy `<_ as chumsky::input::Input<'_>>::Span == SimpleSpan` help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified | 41 | let lit: Select<for<'a, 'b> fn(tokens::Token<'_>, &'a mut MapExtra<'_, 'b, _, _>) -> Option<Expression<'_>>, _, Expression<'_>, _> = select! { | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ``` instead of ``` error[E0284]: type annotations needed for `Select<{closure@/home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chumsky-1.0.0-alpha.6/src/lib.rs:2782:13: 2782:28}, _, Expression<'_>, _>` --> crates/lang/src/parser.rs:41:13 | 41 | let lit = select! { | ^^^ 42 | Token::Int(i) = e => Expression::new(Expr::Lit(ast::Lit::Int(i.parse().unwrap())), e.span()), | ---- type must be known at this point | = note: cannot satisfy `<_ as chumsky::input::Input<'_>>::Span == SimpleSpan` help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified | 41 | let lit: Select<{closure@/home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chumsky-1.0.0-alpha.6/src/lib.rs:2782:13: 2782:28}, _, Expression<'_>, _> = select! { | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ``` Fix #123630.
2024-03-27Stop doing expensive work in opt_suggest_box_span eagerlyMichael Goulet-3/+0
2024-03-17review comment: `str` -> string in messagesEsteban Küber-1/+1
2024-03-03Remove unused fluent messagesr0cky-8/+0
2023-10-20s/generator/coroutine/Oli Scherer-5/+5
2023-10-03Rollup merge of #115863 - chenyukang:yukang-add-message-tidy-check, r=davidtwcoMatthias Krüger-4/+0
Add check_unused_messages in tidy From https://github.com/rust-lang/rust/pull/115728#issuecomment-1715490553 The check is not 100% accurate, I guess it's enough for now.
2023-09-20Cleanup unused messages in ftl filesyukang-4/+0
2023-09-19rustc_hir_analysis: add a helper to check function the signature mismatchesEduardo Sánchez Muñoz-0/+6
This function is now used to check `#[panic_handler]`, `start` lang item, `main`, `#[start]` and intrinsic functions. The diagnosis produced are now closer to the ones produced by trait/impl method signature mismatch.
2023-06-08More robust as_ref/as_deref suggestionsMichael Goulet-3/+0
2023-05-25Ensure Fluent messages are in alphabetical orderclubby789-295/+296
2023-04-17Spelling - compilerJosh Soref-5/+5
* account * achieved * advising * always * ambiguous * analysis * annotations * appropriate * build * candidates * cascading * category * character * clarification * compound * conceptually * constituent * consts * convenience * corresponds * debruijn * debug * debugable * debuggable * deterministic * discriminant * display * documentation * doesn't * ellipsis * erroneous * evaluability * evaluate * evaluation * explicitly * fallible * fulfill * getting * has * highlighting * illustrative * imported * incompatible * infringing * initialized * into * intrinsic * introduced * javascript * liveness * metadata * monomorphization * nonexistent * nontrivial * obligation * obligations * offset * opaque * opportunities * opt-in * outlive * overlapping * paragraph * parentheses * poisson * precisely * predecessors * predicates * preexisting * propagated * really * reentrant * referent * responsibility * rustonomicon * shortcircuit * simplifiable * simplifications * specify * stabilized * structurally * suggestibility * translatable * transmuting * two * unclosed * uninhabited * visibility * volatile * workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-12Auto merge of #110249 - matthiaskrgr:rollup-7iig04q, r=matthiaskrgrbors-1/+1
Rollup of 8 pull requests Successful merges: - #110153 (Fix typos in compiler) - #110165 (rustdoc: use CSS `overscroll-behavior` instead of JavaScript) - #110175 (Symbol cleanups) - #110203 (Remove `..` from return type notation) - #110205 (rustdoc: make settings radio and checks thicker, less contrast) - #110222 (Improve the error message when forwarding a matched fragment to another macro) - #110237 (Split out a separate feature gate for impl trait in associated types) - #110241 (tidy: Issue an error when UI test limits are too high) Failed merges: - #110218 (Remove `ToRegionVid`) r? `@ghost` `@rustbot` modify labels: rollup
2023-04-12Rollup merge of #110153 - DaniPopes:compiler-typos, r=NilstriebMatthias Krüger-1/+1
Fix typos in compiler I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory. Refs #110150
2023-04-11Remove the unused `anon_num_here` error.Nicholas Nethercote-1/+0
2023-04-10Fix typos in compilerDaniPopes-1/+1
2023-04-10Auto merge of #108698 - IntQuant:issue-100717-infer-6, r=davidtwcobors-0/+44
Migrating rustc_infer to session diagnostics (part 5) `@rustbot` label +A-translation cc https://github.com/rust-lang/rust/issues/100717
2023-04-07fix infer_source_kind_subdiag_let help message - remove double "the"ickk-2/+2
2023-04-04Migrate (most of) report_and_explain_type_errorIQuant-0/+22
2023-04-04Migrate TupleTrailingCommaSuggestionIQuant-0/+2
2023-04-04Migrate SuggestTuplePatternIQuant-1/+4
2023-04-04Migrate SuggestBoxingForReturnImplTrait, Fix typo in infer_fn_consider_castingIQuant-0/+3
2023-04-04Migrate SuggestAccessingFieldIQuant-0/+2
2023-04-04Migrate SuggestAsRefWhereAppropriateIQuant-0/+7
2023-04-04Ported FunctionPointerSuggestionIQuant-0/+5
2023-03-11Simplify message pathsest31-0/+350
This makes it easier to open the messages file while developing on features. The commit was the result of automatted changes: for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done