Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cf3816f

Browse files
committedDec 2, 2024·
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
1 parent 32eea2f commit cf3816f

File tree

164 files changed

+1227
-990
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+1227
-990
lines changed
 

‎compiler/rustc_feature/src/removed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ declare_features! (
159159
/// then removed. But there was no utility storing it separately, so now
160160
/// it's in this list.
161161
(removed, no_stack_check, "1.0.0", None, None),
162-
/// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible (object safe).
162+
/// Allows making `dyn Trait` well-formed even if `Trait` is not dyn compatible (object safe).
163163
/// Renamed to `dyn_compatible_for_dispatch`.
164164
(removed, object_safe_for_dispatch, "1.83.0", Some(43561),
165165
Some("renamed to `dyn_compatible_for_dispatch`")),

‎compiler/rustc_feature/src/unstable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ declare_features! (
271271
(unstable, doc_notable_trait, "1.52.0", Some(45040)),
272272
/// Allows using the `may_dangle` attribute (RFC 1327).
273273
(unstable, dropck_eyepatch, "1.10.0", Some(34761)),
274-
/// Allows making `dyn Trait` well-formed even if `Trait` is not dyn-compatible[^1].
274+
/// Allows making `dyn Trait` well-formed even if `Trait` is not dyn compatible[^1].
275275
/// In that case, `dyn Trait: Trait` does not hold. Moreover, coercions and
276276
/// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
277277
///

0 commit comments

Comments
 (0)
Please sign in to comment.