about summary refs log tree commit diff
path: root/tests/ui/dyn-keyword
AgeCommit message (Collapse)AuthorLines
2025-08-17Rehome tests/ui/issues/ tests [5/?]Oneirical-0/+23
2025-07-16future-incompat lints: don't link to the nightly edition-guide versiondianne-4/+4
2025-03-08Fix suggestion when there are generics, inline some thingsMichael Goulet-1/+20
2025-03-08Rework maybe_suggest_add_generic_impl_traitMichael Goulet-1/+114
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-4/+6
``` 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-11Suggest typos when trait path expression is typodMichael Goulet-0/+30
2024-10-11Don't assume traits used as type are trait objsVulnBandit-11/+12
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-4/+4
2024-09-03Rollup merge of #127692 - veera-sivarajan:bugfix-125139, r=estebankMatthias Krüger-1/+9
Suggest `impl Trait` for References to Bare Trait in Function Header Fixes #125139 This PR suggests `impl Trait` when `&Trait` is found as a function parameter type or return type. This makes use of existing diagnostics by adding `peel_refs()` when checking for type equality. Additionaly, it makes a few other improvements: 1. Checks if functions inside impl blocks have bare trait in their headers. 2. Introduces a trait `NextLifetimeParamName` similar to the existing `NextTypeParamName` for suggesting a lifetime name. Also, abstracts out the common logic between the two trait impls. ### Related Issues I ran into a bunch of related diagnostic issues but couldn't fix them within the scope of this PR. So, I have created the following issues: 1. [Misleading Suggestion when Returning a Reference to a Bare Trait from a Function](https://github.com/rust-lang/rust/issues/127689) 2. [Verbose Error When a Function Takes a Bare Trait as Parameter](https://github.com/rust-lang/rust/issues/127690) 3. [Incorrect Suggestion when Returning a Bare Trait from a Function](https://github.com/rust-lang/rust/issues/127691) r​? ```@estebank``` since you implemented #119148
2024-08-25Remove redundant flags that can be inferred from the HIRMichael Goulet-0/+28
2024-07-13Update TestsVeera-1/+9
2024-04-22Deny gen keyword in edition_2024_compat lintsMichael Goulet-0/+1
2024-03-03Move testsCaio-0/+24
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-18/+18
2024-02-09Be less confident when `dyn` suggestion is not checked for object safetytrevyn-4/+4
2024-02-07Stop using `hir_ty_to_ty` in rustc_privacyOli Scherer-66/+2
2024-01-09Avoid silencing relevant follow-up errorsOli Scherer-1/+13
2023-11-24Show number in error message even for one errorNilstrieb-1/+1
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-0/+4
2023-01-11Move /src/test to /testsAlbert Larsan-0/+681