diff options
| author | Taylor Cramer <cramertj@google.com> | 2024-11-20 14:19:36 -0800 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2025-01-22 09:20:57 -0800 |
| commit | d00d4dfe0daba29036aab1f2b35a8c6ccb023f3e (patch) | |
| tree | d2aa54a8a05297e887429b0d984f626c1b94d4ac /tests/ui/traits/alias/self-in-generics.rs | |
| parent | b2728d5426bab1d8c39709768c7e22b7f66dde5d (diff) | |
| download | rust-d00d4dfe0daba29036aab1f2b35a8c6ccb023f3e.tar.gz rust-d00d4dfe0daba29036aab1f2b35a8c6ccb023f3e.zip | |
Refactor dyn-compatibility error and suggestions
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
Diffstat (limited to 'tests/ui/traits/alias/self-in-generics.rs')
| -rw-r--r-- | tests/ui/traits/alias/self-in-generics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/traits/alias/self-in-generics.rs b/tests/ui/traits/alias/self-in-generics.rs index 433b741532d..53752d9cede 100644 --- a/tests/ui/traits/alias/self-in-generics.rs +++ b/tests/ui/traits/alias/self-in-generics.rs @@ -6,6 +6,6 @@ pub trait SelfInput = Fn(&mut Self); pub fn f(_f: &dyn SelfInput) {} -//~^ ERROR the trait alias `SelfInput` cannot be made into an object [E0038] +//~^ ERROR the trait alias `SelfInput` is not dyn compatible [E0038] fn main() {} |
