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[E0428]: the name imp is defined multiple times #69

Closed
aramd opened this issue Feb 12, 2020 · 4 comments
Closed

error[E0428]: the name imp is defined multiple times #69

aramd opened this issue Feb 12, 2020 · 4 comments

Comments

@aramd
Copy link

aramd commented Feb 12, 2020

[192.168.18.146] out: error[E0428]: the name imp is defined multiple times
[192.168.18.146] out: --> /home/aram/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.3.1/src/lib.rs:148:5
[192.168.18.146] out: |
[192.168.18.146] out: 139 | fn imp(n1: u8, haystack: &[u8]) -> Option {
[192.168.18.146] out: | ------------------------------------------------ previous definition of the value imp here
[192.168.18.146] out: ...
[192.168.18.146] out: 148 | fn imp(n1: u8, haystack: &[u8]) -> Option {
[192.168.18.146] out: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imp redefined here
[192.168.18.146] out: |
[192.168.18.146] out: = note: imp must be defined only once in the value namespace of this block

Seems [cfg(all(target_arch = "x86_64", memchr_runtime_simd, not(miri)))] and [cfg(all(memchr_libc, not(all(target_arch = "x86_64", memchr_runtime_simd, miri))))] are not mutually exclusive.

@Ten0
Copy link

Ten0 commented Feb 12, 2020

Duplicate of #68. (A few seconds aside ^^)

@BurntSushi
Copy link
Owner

I'ved yanked 2.3.1 from crates.io until I have time to properly investigate this. cc @ldesgoui

@BurntSushi BurntSushi added the bug label Feb 12, 2020
@BurntSushi
Copy link
Owner

(It was almost certainly caused by #67.)

@BurntSushi
Copy link
Owner

Closing as duplicate of #68.

BurntSushi pushed a commit that referenced this issue Feb 13, 2020
This fixes the cfg knobs, which were producing a compilation error
when memchr had its libc feature enabled without also disabling
automatic SIMD acceleration. This particular combination was
accidentally not tested in CI, so this ended up breaking builds that
had memchr's libc feature enabled.

This also adds tests that will specifically be run under miri.

Fixes #68, Fixes #69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants