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

rustpkg: Un-ignore test_install_invalid_external and test_install_invalid #10369

Closed
wants to merge 1 commit into from

Conversation

catamorphism
Copy link
Contributor

r? @brson or @cmr or @metajack or anyone else who is around

@catamorphism
Copy link
Contributor Author

I think this will fix #9994

@catamorphism
Copy link
Contributor Author

Re-r? @alexcrichton or @cmr or @brson or @metajack

@@ -41,10 +42,74 @@ impl Eq for PkgId {
}
}

// n.b. This code is pretty silly; we should use the real URL library.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have extra::url, I don't know much about it, but was that insufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexcrichton It wasn't insufficient, I just thought it was faster to write the simple version from scratch than to look at the url library. If you'd rather I implement it properly before landing it, I can :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's at least look into it, although if it looks odd, feel free to open an issue on it.

Re-enable test_install_invalid_external and test_install_invalid

Also improves an error message

Closes rust-lang#9994
@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen if you have updates!

Jarcho pushed a commit to Jarcho/rust that referenced this pull request Feb 26, 2023
Add new lint no_mangle_with_rust_abi

Fixes issue rust-lang#10347

This PR adds a new lint `no_mangle_with_rust_abi` that suggests converting a function to the C ABI to if the function has the `#[no_mangle]` attribute and `Abi == Abi::Rust`. It will not run for any of the other variants defined in [rustc_target::spec::abi::Abi](https://doc.rust-lang.org/beta/nightly-rustc/rustc_target/spec/abi/enum.Abi.html), nor suggest any conversion other than conversion to the C ABI.

Functions that explicitly opt into the Rust ABI with `extern "Rust"` are ignored by this lint.

---

changelog: [`no_mangle_with_rust_abi`]: add lint that converts Rust ABI functions with the `#[no_mangle]` attribute to C ABI
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

Successfully merging this pull request may close these issues.

3 participants