Skip to content

Future compatibility warning ("CloneToAny" cannot be made into an object) #31

Description

@jonas-schievink

Compiling anymap on the current nightly results in this warning: rust-lang/rust#51443

warning: the trait `any::CloneToAny` cannot be made into an object                                                                                                                
  --> src/any.rs:15:5                                                                                                                                                             
   |                                                                                                                                                                              
15 |     fn clone_to_any_send(&self) -> Box<CloneAny + Send> where Self: Send;                                                                                                    
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                    
   |                                                                                                                                                                              
   = 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 `clone_to_any_send` references the `Self` type in where clauses                                                                                                 

(same warning for all clone_to_any_X methods)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions