about summary refs log tree commit diff
path: root/tests/ui/associated-item
AgeCommit message (Collapse)AuthorLines
2025-07-18Reword diagnostics about relaxed bounds in invalid contextsLeón Orell Valerian Liehr-7/+3
2025-07-18AST lowering: More robustly deal with relaxed boundsLeón Orell Valerian Liehr-18/+11
2025-07-13Retire hir::*ItemRef.Camille GILLOT-1/+1
2025-05-06Preserve generic args in suggestions for ambiguous associated itemsLeón Orell Valerian Liehr-2/+13
Most notably, this preserves the `(..)` of ambiguous RTN paths.
2025-02-26Rollup merge of #137631 - TaKO8Ki:issue-137508, r=compiler-errorsLeón Orell Valerian Liehr-0/+33
Avoid collecting associated types for undefined trait Fixes #137508 Fixes #137554
2025-02-26fix #137508Takayuki Maeda-0/+33
rename ui tests check if res is trait def fix typo regression test for #137554
2025-02-21More sophisticated span trimmingMichael Goulet-9/+6
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-6/+9
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2025-01-26Compiler: Finalize dyn compatibility renamingLeón Orell Valerian Liehr-1/+1
2025-01-22Refactor dyn-compatibility error and suggestionsTaylor Cramer-5/+6
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc #132713 cc #133267
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-1/+1
2024-02-22Deduplicate some logic and reword outputEsteban Küber-3/+3
2024-02-22Make confusable suggestions `verbose`Esteban Küber-12/+18
2024-02-22Consider methods from traits when suggesting typosEsteban Küber-1/+1
Do not provide a structured suggestion when the arguments don't match. ``` error[E0599]: no method named `test_mut` found for struct `Vec<{integer}>` in the current scope --> $DIR/auto-ref-slice-plus-ref.rs:7:7 | LL | a.test_mut(); | ^^^^^^^^ | = help: items from traits can only be used if the trait is implemented and in scope note: `MyIter` defines an item `test_mut`, perhaps you need to implement it --> $DIR/auto-ref-slice-plus-ref.rs:14:1 | LL | trait MyIter { | ^^^^^^^^^^^^ help: there is a method `get_mut` with a similar name, but with different arguments --> $SRC_DIR/core/src/slice/mod.rs:LL:COL ``` Consider methods beyond inherent ones when suggesting typos. ``` error[E0599]: no method named `owned` found for reference `&dyn Foo` in the current scope --> $DIR/object-pointer-types.rs:11:7 | LL | fn owned(self: Box<Self>); | --------- the method might not be found because of this arbitrary self type ... LL | x.owned(); | ^^^^^ help: there is a method with a similar name: `to_owned` ``` Fix #101013.
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-7/+7
2023-11-30generic_const_exprs: suggest to add the feature, not use itRalf Jung-1/+1
2023-11-24Show number in error message even for one errorNilstrieb-4/+4
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-17Unify suggestion wordingEsteban Küber-2/+2
2023-01-11review comments: account for genericsEsteban Küber-0/+37
2023-01-11When suggesting writing a fully qualified path probe for appropriate typesEsteban Küber-1/+1
Fix #46585.
2023-01-11Move /src/test to /testsAlbert Larsan-0/+386