Skip to content

Feature gate for dyn_compatible_for_dispatch not suggested #65745

Closed as not planned
@Centril

Description

@Centril

Code:

struct S(Box<dyn Copy>);

errors with:

error[E0038]: the trait `std::marker::Copy` cannot be made into an object
 --> f.rs:1:10
  |
1 | struct S(Box<dyn Copy>);
  |          ^^^^^^^^^^^^^ the trait `std::marker::Copy` cannot be made into an object
  |
  = note: the trait cannot require that `Self : Sized`

But it does not suggest adding the feature gate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-dyn_compatible_for_dispatch`#![feature(dyn_compatible_for_dispatch)]`; formerly `object_safe_for_dispatch`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions