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

Benchmark compilation error #335

Closed
zamazan4ik opened this issue May 24, 2024 · 2 comments
Closed

Benchmark compilation error #335

zamazan4ik opened this issue May 24, 2024 · 2 comments

Comments

@zamazan4ik
Copy link

Hi!

I tried to run the benchmarks for the project with cargo +nightly bench but got the following error:

   Compiling amber v0.6.0 (/home/zamazan4ik/open_source/amber)
error[E0432]: unresolved import `rand::StdRng`
 --> benches/matcher.rs:8:30
  |
8 | use rand::{Rng, SeedableRng, StdRng};
  |                              ^^^^^^ no `StdRng` in the root
  |
  = help: consider importing this struct instead:
          rand::rngs::StdRng

warning: unused import: `Rng`
 --> benches/matcher.rs:8:12
  |
8 | use rand::{Rng, SeedableRng, StdRng};
  |            ^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0782]: trait objects must include the `dyn` keyword
  --> benches/matcher.rs:41:31
   |
41 | fn bench(b: &mut Bencher, m: &Matcher) {
   |                               ^^^^^^^
   |
help: add `dyn` keyword before this trait
   |
41 | fn bench(b: &mut Bencher, m: &dyn Matcher) {
   |                               +++

Some errors have detailed explanations: E0432, E0782.
For more information about an error, try `rustc --explain E0432`.
warning: `amber` (bench "matcher") generated 1 warning
error: could not compile `amber` (bench "matcher") due to 2 previous errors; 1 warning emitted

Rustc version: 1.80.0-nightly
Amber version: master branch, a8a915a606043a665b322fcb30bddfeb50c591ec commit

dalance added a commit that referenced this issue Jun 12, 2024
@dalance
Copy link
Owner

dalance commented Jun 12, 2024

Thanks!
I fixed it.

@zamazan4ik
Copy link
Author

Thank you!

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

2 participants