about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/messages.ftl
AgeCommit message (Collapse)AuthorLines
2023-12-07Resolve assoc item bindings by namespaceLeón Orell Valerian Liehr-9/+22
If a const is expected, resolve a const. If a type is expected, resolve a type. Don't try to resolve a type first falling back to consts.
2023-10-30Detect object safety errors when assoc type is missingEsteban Küber-1/+1
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
2023-10-24Migrate diagnostics in `rustc_hir_analysis/src/coherence/orphan.rs`Obei Sideg-0/+41
2023-10-23Let's see what those opaque types actually areMichael Goulet-0/+2
2023-10-03Rollup merge of #115863 - chenyukang:yukang-add-message-tidy-check, r=davidtwcoMatthias Krüger-2/+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-29Auto merge of #115821 - obeis:hir-analysis-migrate-diagnostics-5, ↵bors-0/+25
r=compiler-errors Migrate `rustc_hir_analysis` to session diagnostic [Part 5] Finishing `coherence/builtin.rs` file
2023-09-22Change `start` to `#[start]` in some diagnosisEduardo Sánchez Muñoz-10/+10
They refer to a function with the `start` attribute, but not necessarily named `start`.
2023-09-20Cleanup unused messages in ftl filesyukang-2/+0
2023-09-20Migrate `rustc_hir_analysis` to session diagnosticObei Sideg-0/+25
Part 5: Finishing `coherence/builtin.rs` file
2023-09-20Auto merge of #115486 - compiler-errors:dont-capture-late-pls, r=cjgillotbors-4/+8
Correctly deny late-bound lifetimes from parent in anon consts and TAITs Reuse the `AnonConstBoundary` scope (introduced in #108553, renamed in this PR to `LateBoundary`) to deny late-bound vars of *all* kinds (ty/const/lifetime) in anon consts and TAITs. Side-note, but I would like to consolidate this with the error reporting for RPITs (E0657): https://github.com/rust-lang/rust/blob/c4f25777a08cd64b710e8a9a6159e67cbb35e6f5/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs#L733-L754 but the semantics about what we're allowed to capture there are slightly different, so I'm leaving that untouched. Fixes #115474
2023-09-17Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errorsbors-6/+6
repr(transparent): it's fine if the one non-1-ZST field is a ZST This code currently gets rejected: ```rust #[repr(transparent)] struct MyType([u16; 0]) ``` That clearly seems like a bug to me: `repr(transparent)` [got defined ](https://github.com/rust-lang/rust/issues/77841#issuecomment-716575747) as having any number of 1-ZST fields plus optionally one more field; `MyType` clearly satisfies that definition. This PR changes the `repr(transparent)` logic to actually match that definition.
2023-09-14Migrate `rustc_hir_analysis` to session diagnosticObei Sideg-0/+28
Part 6: Finish `coherence/inherent_impls.rs`
2023-09-07Add noteMichael Goulet-0/+1
2023-09-07Implement refinement lint for RPITITMichael Goulet-0/+5
2023-09-05Correctly deny late-bound lifetimes from parent in anon consts and TAITsMichael Goulet-4/+8
2023-08-29repr(transparent): it's fine if the one non-1-ZST field is a ZSTRalf Jung-6/+6
2023-08-11Don't add associated type bound for non-typesMichael Goulet-0/+3
2023-07-07Require TAITs to be mentioned in the signatures of functions that register ↵Oli Scherer-0/+3
hidden types for them
2023-07-05Lint now-unnecessary associated type boundsOli Scherer-0/+5
2023-06-30Rollup merge of #113071 - ↵Matthias Krüger-0/+9
compiler-errors:no-parent-non-lifetime-args-in-apit, r=eholk Account for late-bound vars from parent arg-position impl trait We should be reporting an error like we do for late-bound args coming from a parent APIT. Fixes #113016
2023-06-28Auto merge of #111269 - clubby789:validate-fluent-variables, r=davidtwcobors-1/+1
Validate fluent variable references in tests Closes #101109 Under `cfg(test)`, the `fluent_messages` macro will emit a list of variables referenced by each message and its attributes. The derive attribute will now emit a `#[test]` that checks that each referenced variable exists in the structure it's applied to.
2023-06-26migrate lifetime tooMichael Goulet-0/+3
2023-06-26Account for late-bound vars from parent arg-position impl traitMichael Goulet-0/+6
2023-06-05Emit an error when RTN is used with ty/ct paramsMichael Goulet-0/+7
2023-05-26Fix diagnostics with errorsclubby789-1/+1
2023-05-25Ensure Fluent messages are in alphabetical orderclubby789-183/+183
2023-05-09Rollup merge of #111252 - matthewjasper:min-spec-improvements, r=compiler-errorsDylan DPC-0/+3
Min specialization improvements - Don't allow specialization impls with no items, such implementations are probably not correct and only occur as mistakes in the compiler and standard library - Fix a missing normalization call - Adds spans for lifetime errors from overly general specializations Closes #79457 Closes #109815
2023-05-07Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillotbors-1/+5
Support return-type bounds on associated methods from supertraits Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds). The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
2023-05-05Disallow (min) specialization imps with no itemsMatthew Jasper-0/+3
Such implementations are usually mistakes and are not used in the compiler or standard library (after this commit) so forbid them with `min_specialization`.
2023-05-04Rollup merge of #110859 - compiler-errors:no-negative-drop-impls, r=oli-obkMatthias Krüger-0/+4
Explicitly reject negative and reservation drop impls Fixes #110858 It doesn't really make sense for a type to have a `!Drop` impl. Or at least, I don't want us to implicitly assign a meaning to it by the way the compiler *currently* handles it (incompletely), and rather I would like to see a PR (or an RFC...) assign a meaning to `!Drop` if we actually wanted one for it.
2023-05-03Error message for ambiguous RTN from super boundsMichael Goulet-0/+4
2023-05-03Support RTN on associated methods from supertraitsMichael Goulet-1/+1
2023-05-02Rollup merge of #108161 - WaffleLapkin:const_param_ty, r=BoxyUwUDylan DPC-0/+4
Add `ConstParamTy` trait This is a bit sketch, but idk. r? `@BoxyUwU` Yet to be done: - [x] ~~Figure out if it's okay to implement `StructuralEq` for primitives / possibly remove their special casing~~ (it should be okay, but maybe not in this PR...) - [ ] Maybe refactor the code a little bit - [x] Use a macro to make impls a bit nicer Future work: - [ ] Actually™ use the trait when checking if a `const` generic type is allowed - [ ] _Really_ refactor the surrounding code - [ ] Refactor `marker.rs` into multiple modules for each "theme" of markers
2023-04-27Explicitly reject negative and reservation drop implsMichael Goulet-0/+4
2023-04-27Add a `ConstParamTy` traitMaybe Waffle-0/+4
2023-04-25Fix static string lintsclubby789-0/+14
2023-04-21Migrate `rustc_hir_analysis` to session diagnosticObei Sideg-0/+37
Part 4: Finishing `check/mod.rs` file
2023-04-08Migrate `rustc_hir_analysis` to session diagnosticObei Sideg-0/+36
Part 3: Finishing `collect.rs` file
2023-03-28Add tests and error messagesMichael Goulet-0/+11
2023-03-12Forbid the use of `#[target_feature]` on `start`Léo Lanteri Thauvin-0/+3
2023-03-12Forbid the use of `#[target_feature]` on `main`Léo Lanteri Thauvin-0/+2
2023-03-11Simplify message pathsest31-0/+175
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