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

warning: the trait Any cannot be made into an object #23

Open
alecmocatta opened this issue Nov 5, 2019 · 0 comments
Open

warning: the trait Any cannot be made into an object #23

alecmocatta opened this issue Nov 5, 2019 · 0 comments

Comments

@alecmocatta
Copy link
Owner

alecmocatta commented Nov 5, 2019

This warning is spurious, as noted in the linked issue rust-lang/rust#51443 the lint is overly broad and in fact needn't fire for marker traits.

This could be fixed in rustc by adjusting the lint here: https://github.com/rust-lang/rust/blob/2f16be42dd64669b784559e98662d9712ce13fab/src/librustc/traits/object_safety.rs#L343

See also the commit that introdued the lint: rust-lang/rust@1453b3a

warning: the trait `serde_traitobject::convenience::Any` cannot be made into an object
  |
  = note: `#[warn(where_clauses_object_safety)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #51443 <https://github.com/rust-lang/rust/issues/51443>
  = note: method `into_any_send` references the `Self` type in where clauses

rustc PR to fix this: rust-lang/rust#66122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant