about summary refs log tree commit diff
path: root/compiler/rustc_resolve/messages.ftl
AgeCommit message (Collapse)AuthorLines
2025-09-14Move more early buffered lints to dyn lint diagnostics (3/N)León Orell Valerian Liehr-0/+11
2025-09-14Move more early buffered lints to dyn lint diagnostics (2/N)León Orell Valerian Liehr-0/+7
2025-09-14Move more early buffered lints to dyn lint diagnostics (1/N)León Orell Valerian Liehr-0/+6
2025-08-25On binding not present in all patterns, suggest potential typoEsteban Küber-0/+2
``` error[E0408]: variable `Ban` is not bound in all patterns --> f12.rs:9:9 | 9 | (Foo,Bar)|(Ban,Foo) => {} | ^^^^^^^^^ --- variable not in all patterns | | | pattern doesn't bind `Ban` | help: you might have meant to use the similarly named previously used binding `Bar` | 9 - (Foo,Bar)|(Ban,Foo) => {} 9 + (Foo,Bar)|(Bar,Foo) => {} | ```
2025-08-19Rollup merge of #145166 - makai410:teach-pub-crate, r=lcnr许杰友 Jieyou Xu (Joe)-0/+3
suggest using `pub(crate)` for E0364 - This introduces `vis_span` into `ImportData` for diagnostic purposes. Closes: rust-lang/rust#145140
2025-08-14mbe: Handle applying `macro_rules` derivesJosh Triplett-1/+1
Add infrastructure to apply a derive macro to arguments, consuming and returning a `TokenTree` only. Handle `SyntaxExtensionKind::MacroRules` when expanding a derive, if the macro's kinds support derive. Add tests covering various cases of `macro_rules` derives. Note that due to a pre-existing FIXME in `expand.rs`, derives are re-queued and some errors get emitted twice. Duplicate diagnostic suppression makes them not visible, but the FIXME should still get fixed.
2025-08-13suggest using `pub(crate)` for E0364Makai-0/+3
2025-08-12Detect and report macro kind mismatches early, and more preciselyJosh Triplett-0/+3
This eliminates the case in `failed_to_match_macro` to check for a function-like invocation of a macro with no function-like rules. Instead, macro kind mismatches now result in an unresolved macro, and we detect this case in `unresolved_macro_suggestions`, which now carefully distinguishes between a kind mismatch and other errors. This also handles cases of forward-referenced attributes and cyclic attributes. Expand test coverage to include all of these cases.
2025-08-08mbe: Fix error message for using a macro with no `attr` rules as an attributeJosh Triplett-1/+1
Avoid saying "a declarative macro cannot be used as an attribute macro"; instead, say that the macro has no `attr` rules.
2025-07-23Ports `#[macro_use]` and `#[macro_escape]` to the new attribute parsing ↵Jonathan Brouwer-2/+0
infrastructure
2025-07-01Suggest use another lifetime specifier instead of underscore lifetimexizheyin-0/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-06-07rustc_resolve: Improve `resolve_const_param_in_non_trivial_anon_const` wordingMartin Nordholts-1/+1
In some contexts, const expressions are OK. Add a `here` to the error message to clarify this.
2025-05-02resolve: Support imports of associated types and glob imports from traitsVadim Petrochenkov-7/+0
2025-03-19Allow builtin macros to be used more than once.Mara Bos-4/+0
This removes E0773 "A builtin-macro was defined more than once."
2025-03-12Disentangle ForwardGenericParamBan and ConstParamTy ribsMichael Goulet-3/+9
2025-02-28Introduce `feature(generic_const_parameter_types)`Boxy-9/+0
2024-11-22Diagnostic for using macro_rules macro as attr/deriveclubby789-1/+7
2024-09-02chore: Fix typos in 'compiler' (batch 2)Alexander Cyon-1/+1
2024-07-12When finding item gated behind a `cfg` flat, point at itEsteban Küber-0/+2
Previously we would only mention that the item was gated out, and opportunisitically mention the feature flag name when possible. We now point to the place where the item was gated, which can be behind layers of macro indirection, or in different modules. ``` error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` --> $DIR/diagnostics-cross-crate.rs:18:23 | LL | cfged_out::inner::doesnt_exist::hello(); | ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner` | note: found an item that was configured out --> $DIR/auxiliary/cfged_out.rs:6:13 | LL | pub mod doesnt_exist { | ^^^^^^^^^^^^ note: the item is gated here --> $DIR/auxiliary/cfged_out.rs:5:5 | LL | #[cfg(FALSE)] | ^^^^^^^^^^^^^ ```
2024-06-21Fix remaining casesMichael Goulet-1/+1
2024-05-24And more general errorMichael Baikov-1/+5
2024-05-24A custom error message for lending iteratorsMichael Baikov-0/+4
2024-04-13Reorder error messagesJean CASPAR-13/+6
2024-04-13Migrate more diagnosticsJean CASPAR-0/+106
2024-04-13Migrate some diagnosticsJean CASPAR-1/+1
2024-04-13Port build_reduce_graphJeanCASPAR-2/+58
2024-03-04Rollup merge of #121130 - chenyukang:yukang-fix-121061-macro-later, ↵Matthias Krüger-0/+7
r=matthiaskrgr Suggest moving definition if non-found macro_rules! is defined later Fixes #121061
2024-03-01Remove unused fluent messagesr0cky-22/+0
2024-02-29Suggest moving if non-found macro_rules! is defined lateryukang-0/+7
2024-02-06Rollup merge of #119939 - clubby789:static-const-generic-note, r=compiler-errorsMatthias Krüger-2/+12
Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items Fixes #109596 Fixes #119936
2024-02-04Suggest `[tail @ ..]` on `[..tail]` and `[...tail]` where `tail` is unresolvedLeón Orell Valerian Liehr-0/+3
2024-02-02Suggest changing ty to const params if appropriateLeón Orell Valerian Liehr-0/+3
2024-01-14Special case 'generic param from outer item' message for `Self`clubby789-2/+8
2024-01-14Add note to resolve error about generics from inside static/constclubby789-0/+4
2024-01-09Check bindings around never patternsNadrieril-0/+4
2023-12-06tip for define macro name after `macro_rules!`bohan-0/+2
2023-12-01Auto merge of #115993 - bvanjoi:fix-115966, r=petrochenkovbors-2/+0
vis note for no pub reexports glob import Fixes #115966 Only trigger the `unused_import` lint when it's not being used. r? `@petrochenkov`
2023-12-01vis note for no pub reexports glob importbohan-2/+0
2023-11-30generic_const_exprs: suggest to add the feature, not use itRalf Jung-1/+1
2023-09-20Cleanup unused messages in ftl filesyukang-12/+0
2023-09-11Rollup merge of #115744 - fmease:fix-e0401, r=compiler-errorsMatthias Krüger-16/+13
Improve diagnostic for generic params from outer items (E0401) Generalize the wording of E0401 to talk about *outer items* instead of *outer functions* since the current phrasing is outdated. The outer item can be a function, constant, trait, ADT or impl block (see the new UI test for the more exotic examples). Further, don't suggest introducing generic parameters to constant items unless the feature `generic_const_items` is enabled. Lastly, make E0401 translatable while we're at it. Fixes #115720.
2023-09-10Make E0401 translatableLeón Orell Valerian Liehr-16/+13
2023-09-04resolve: derive diag for undetermined macro resolutionbohan-0/+4
2023-06-25Add translatable diagnostic for import resolution stringsTom Martin-0/+38
Add translatable diagnostic for cannot be reexported error also added for subdiagnostics Add translatable diagnostics for resolve_glob_import errors Add translatable diag for unable to determine import resolution Add translatable diag for is not directly importable
2023-06-19Remove unreachable and untested suggestion for invalid span enum derive(Default)Tom Martin-3/+0
2023-06-18Fix tidyTom Martin-22/+21
2023-06-18Add translatable diagnostic for various strings in ↵Tom Martin-0/+13
resolve::unresolved_macro_suggestions
2023-06-18Add translatable diagnostic for cannot find in this scopeTom Martin-1/+4
2023-06-18Add translatable diagnostic for invalid importsTom Martin-0/+3
2023-06-18Add translatable diagnostic for changing import bindingTom Martin-0/+3