Fix import resolution in crc32 for the Android build #379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I see the following error when attempting to build zlib-rs tests in the Android project, although not when building with Cargo (not sure why):
error: cannot determine resolution for the import
--> external/rust/android-crates-io/crates/zlib-rs/src/crc32.rs:93:9
|
93 | use test::braid::crc32_braid;
| ^^^^^^^^^^^^^^^^^^^^^^^^
error[E0659]:
testis ambiguous--> external/rust/android-crates-io/crates/zlib-rs/src/crc32.rs:93:9
|
93 | use test::braid::crc32_braid;
| ^^^^ ambiguous name
|
= note: ambiguous because of a conflict between a name from a glob import and
an outer scope during import or macro resolution
= note:
testcould refer to a crate passed with--extern= help: use
::testto refer to this crate unambiguouslynote:
testcould also refer to the module imported here--> external/rust/android-crates-io/crates/zlib-rs/src/crc32.rs:95:9
|
95 | use super::*;
| ^^^^^^^^
= help: consider adding an explicit import of
testto disambiguate= help: or use
self::testto refer to this module unambiguouslyRemoving "test::" fixes it. Tests continue to pass both using cargo and the Android build system.