Skip to content

Linking dylib to rlib doesn't emit error, although reversed one does #11240

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

Closed
klutzy opened this issue Dec 31, 2013 · 1 comment
Closed

Linking dylib to rlib doesn't emit error, although reversed one does #11240

klutzy opened this issue Dec 31, 2013 · 1 comment

Comments

@klutzy
Copy link
Contributor

klutzy commented Dec 31, 2013

a.rs:

#[crate_type = "dylib"];

b.rs:

#[crate_type = "rlib"];
extern mod a;

Then liba-ca3f740d-0.0.so and libb-920859ee-0.0.rlib are built successfully.

The reversed case causes error as expected:

error: could not find dynamic library for: `a`
@alexcrichton
Copy link
Member

Closing as working as intended. This falls under the jurisdiction of #10729 (not allowing mixed static/dynamic dependencies right now).

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 1, 2023
Extend `maybe_misused_cfg` lint over `cfg(test)`

Fixes rust-lang#11240.

One thought I had is that we could use the levenshtein distance (of 1) to ensure this is indeed `test` that was targeted. But maybe it's overkill, not sure.

changelog: [`maybe_misused_cfg`]: Extend lint over `cfg(test)`

r? `@blyxyas`
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