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

error: use of deprecated item 'rand_os::OsRng': OsRng is now provided by rand_core and rand #328

Open
eclipseo opened this issue Sep 13, 2019 · 0 comments · May be fixed by #329
Open

error: use of deprecated item 'rand_os::OsRng': OsRng is now provided by rand_core and rand #328

eclipseo opened this issue Sep 13, 2019 · 0 comments · May be fixed by #329

Comments

@eclipseo
Copy link

@eclipseo eclipseo commented Sep 13, 2019

I'm trying to build the latest version but it fails because of deny(deprecated) and use of OsRng

 Compiling criterion v0.3.0 (/builddir/build/BUILD/criterion-0.3.0)
     Running `/usr/bin/rustc --edition=2018 --crate-name criterion src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="default"' -C metadata=1cb9beabb42389f4 -C extra-filename=-1cb9beabb42389f4 --out-dir /builddir/build/BUILD/criterion-0.3.0/target/release/deps -L dependency=/builddir/build/BUILD/criterion-0.3.0/target/release/deps --extern atty=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libatty-bdebf8293c0f727c.rlib --extern cast=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libcast-2e0207fec18bc906.rlib --extern clap=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libclap-e5e861fc3bef04b9.rlib --extern criterion_plot=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libcriterion_plot-b6cb6413dcdbb22f.rlib --extern csv=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libcsv-d184e566f0c27063.rlib --extern itertools=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libitertools-a6880494d646c1ce.rlib --extern lazy_static=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/liblazy_static-cc1739cefda391df.rlib --extern num_traits=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libnum_traits-a440ec25d2165635.rlib --extern rand_core=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/librand_core-84a9381f3b8829b1.rlib --extern rand_os=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/librand_os-d20b94434fd0d01a.rlib --extern rand_xoshiro=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/librand_xoshiro-05bb008f66bbe7fa.rlib --extern rayon=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/librayon-07c347a7069cd407.rlib --extern serde=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libserde-344019324e042f81.rlib --extern serde_derive=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libserde_derive-d7be4be51738d6ca.so --extern serde_json=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libserde_json-dc32d09552e284ca.rlib --extern tinytemplate=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libtinytemplate-f01b635ef0876da0.rlib --extern walkdir=/builddir/build/BUILD/criterion-0.3.0/target/release/deps/libwalkdir-101875ad59da4c9c.rlib -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now -Ccodegen-units=1`
error: use of deprecated item 'rand_os': OsRng is now provided by rand_core and rand
  --> src/lib.rs:55:1
   |
55 | extern crate rand_os;
   | ^^^^^^^^^^^^^^^^^^^^^
   |
note: lint level defined here
  --> src/lib.rs:20:9
   |
20 | #![deny(warnings)]
   |         ^^^^^^^^
   = note: #[deny(deprecated)] implied by #[deny(warnings)]

error: use of deprecated item 'rand_os::OsRng': OsRng is now provided by rand_core and rand
 --> src/stats/rand_util.rs:2:5
  |
2 | use rand_os::OsRng;
  |     ^^^^^^^^^^^^^^

error: use of deprecated item 'rand_os::OsRng': OsRng is now provided by rand_core and rand
  --> src/stats/rand_util.rs:10:31
   |
10 |     static SEED_RAND: RefCell<OsRng> = RefCell::new(OsRng);
   |                               ^^^^^

error: use of deprecated item 'rand_os::OsRng': OsRng is now provided by rand_core and rand
  --> src/stats/rand_util.rs:10:53
   |
10 |     static SEED_RAND: RefCell<OsRng> = RefCell::new(OsRng);
   |                                                     ^^^^^

error: aborting due to 4 previous errors

error: Could not compile `criterion`.
eclipseo added a commit to eclipseo/criterion.rs that referenced this issue Sep 13, 2019
Fix bheisler#328

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.