Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature gate for object_safe_for_dispatch not suggested #65745

Open
Centril opened this issue Oct 23, 2019 · 1 comment
Open

Feature gate for object_safe_for_dispatch not suggested #65745

Centril opened this issue Oct 23, 2019 · 1 comment
Labels
C-bug Category: This is a bug. F-object_safe_for_dispatch `#![feature(object_safe_for_dispatch)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Centril
Copy link
Contributor

Centril commented Oct 23, 2019

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.

@Centril Centril added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. F-object_safe_for_dispatch `#![feature(object_safe_for_dispatch)]` labels Oct 23, 2019
@Centril
Copy link
Contributor Author

Centril commented Oct 25, 2019

cc @nikomatsakis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-object_safe_for_dispatch `#![feature(object_safe_for_dispatch)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant