Skip to content

Deprecation warnings when compiling tests of libserialize #20278

@dgiagio

Description

@dgiagio

There are some deprecation warnings when compiling tests of libserialize.

json.rs:2520:17: 2520:45 warning: use of deprecated item: call the .parse() method on the string instead, #[warn(deprecated)] on by default
json.rs:2520         assert!(::std::str::from_str::<Json>(s).unwrap() == from_str(s).unwrap());
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 12:2 note: in expansion of assert!
json.rs:2520:9: 2520:83 note: expansion site
json.rs:3732:33: 3732:46 warning: use of deprecated item: call `.to_owned()` on `std::borrow::ToOwned` instead, #[warn(deprecated)] on by default
json.rs:3732             tree_map.insert("a".into_string(), U64(1));
                                             ^~~~~~~~~~~~~
json.rs:3733:33: 3733:46 warning: use of deprecated item: call `.to_owned()` on `std::borrow::ToOwned` instead, #[warn(deprecated)] on by default
json.rs:3733             tree_map.insert("b".into_string(), U64(2));
                                             ^~~~~~~~~~~~~
json.rs:3765:29: 3765:42 warning: use of deprecated item: call `.to_owned()` on `std::borrow::ToOwned` instead, #[warn(deprecated)] on by default
json.rs:3765         tree_map.insert("a".into_string(), 1u);
                                         ^~~~~~~~~~~~~
json.rs:3766:29: 3766:42 warning: use of deprecated item: call `.to_owned()` on `std::borrow::ToOwned` instead, #[warn(deprecated)] on by default
json.rs:3766         tree_map.insert("b".into_string(), 2);
                                         ^~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions