Skip to content

[wasmparser] 0.218.0 test suite fails with use of undeclared crate or module wat` #1947

Closed
@apteryks

Description

@apteryks

I'm trying to run the test suite, and I'm getting:

   Compiling wasmparser v0.218.0 (/tmp/guix-build-rust-wasmparser-0.218.0.drv-0/wasmparser-0.218.0)
error[E0433]: failed to resolve: use of undeclared crate or module `wat`
    --> src/validator.rs:1515:21
     |
1515 |         let bytes = wat::parse_str(
     |                     ^^^ use of undeclared crate or module `wat`

error[E0433]: failed to resolve: use of undeclared crate or module `wat`
    --> src/validator.rs:1610:21
     |
1610 |         let bytes = wat::parse_str(
     |                     ^^^ use of undeclared crate or module `wat`

error[E0433]: failed to resolve: use of undeclared crate or module `wat`
    --> src/validator.rs:1643:21
     |
1643 |         let bytes = wat::parse_str(
     |                     ^^^ use of undeclared crate or module `wat`

error[E0283]: type annotations needed
  --> src/collections/index_map/tests.rs:45:26
   |
45 |     assert!(map.values().eq([].iter()));
   |                          ^^ cannot infer type of the type parameter `I` declared on the method `eq`
   |
   = note: multiple `impl`s satisfying `i32: PartialEq<_>` found in the following crates: `core`, `serde_json`:
           - impl PartialEq<serde_json::Value> for i32;
           - impl<host> PartialEq for i32
             where the constant `host` has type `bool`;
   = note: required for `&i32` to implement `PartialEq<&_>`
note: required by a bound in `core::iter::Iterator::eq`
  --> /tmp/guix-build-rust-1.77.1.drv-0/rustc-1.77.1-src/library/core/src/iter/traits/iterator.rs:3852:5
help: consider specifying the generic argument
   |
45 |     assert!(map.values().eq::<core::slice::Iter<'_, T>>([].iter()));
   |                            ++++++++++++++++++++++++++++

error[E0283]: type annotations needed
  --> src/collections/index_map/tests.rs:46:30
   |
46 |     assert!(map.values_mut().eq([].iter()));
   |                              ^^ cannot infer type of the type parameter `I` declared on the method `eq`
   |
   = note: multiple `impl`s satisfying `i32: PartialEq<_>` found in the following crates: `core`, `serde_json`:
           - impl PartialEq<serde_json::Value> for i32;
           - impl<host> PartialEq for i32
             where the constant `host` has type `bool`;
   = note: required for `&mut i32` to implement `PartialEq<&_>`
note: required by a bound in `core::iter::Iterator::eq`
  --> /tmp/guix-build-rust-1.77.1.drv-0/rustc-1.77.1-src/library/core/src/iter/traits/iterator.rs:3852:5
help: consider specifying the generic argument
   |
46 |     assert!(map.values_mut().eq::<core::slice::Iter<'_, T>>([].iter()));
   |                                ++++++++++++++++++++++++++++

error[E0283]: type annotations needed
  --> src/collections/index_map/tests.rs:95:26
   |
95 |     assert!(map.values().eq([].iter()));
   |                          ^^ cannot infer type of the type parameter `I` declared on the method `eq`
   |
   = note: multiple `impl`s satisfying `i32: PartialEq<_>` found in the following crates: `core`, `serde_json`:
           - impl PartialEq<serde_json::Value> for i32;
           - impl<host> PartialEq for i32
             where the constant `host` has type `bool`;
   = note: required for `&i32` to implement `PartialEq<&_>`
note: required by a bound in `core::iter::Iterator::eq`
  --> /tmp/guix-build-rust-1.77.1.drv-0/rustc-1.77.1-src/library/core/src/iter/traits/iterator.rs:3852:5
help: consider specifying the generic argument
   |
95 |     assert!(map.values().eq::<core::slice::Iter<'_, T>>([].iter()));
   |                            ++++++++++++++++++++++++++++

error[E0283]: type annotations needed
  --> src/collections/index_map/tests.rs:96:30
   |
96 |     assert!(map.values_mut().eq([].iter()));
   |                              ^^ cannot infer type of the type parameter `I` declared on the method `eq`
   |
   = note: multiple `impl`s satisfying `i32: PartialEq<_>` found in the following crates: `core`, `serde_json`:
           - impl PartialEq<serde_json::Value> for i32;
           - impl<host> PartialEq for i32
             where the constant `host` has type `bool`;
   = note: required for `&mut i32` to implement `PartialEq<&_>`
note: required by a bound in `core::iter::Iterator::eq`
  --> /tmp/guix-build-rust-1.77.1.drv-0/rustc-1.77.1-src/library/core/src/iter/traits/iterator.rs:3852:5
help: consider specifying the generic argument
   |
96 |     assert!(map.values_mut().eq::<core::slice::Iter<'_, T>>([].iter()));
   |                                ++++++++++++++++++++++++++++

Some errors have detailed explanations: E0283, E0433.
For more information about an error, try `rustc --explain E0283`.
error: could not compile `wasmparser` (lib test) due to 7 previous errors
warning: build failed, waiting for other jobs to finish...
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "cargo" arguments: ("test" "--release") exit-status: 101 term-signal: #f stop-signal: #f> 
phase `check' failed after 9.7 seconds
command "cargo" "test" "--release" failed with status 101
``

As you can see in the Guix output above, the test suite is run using `cargo test --release`.

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