-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix --extern library finding errors #104621
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) soon. Please see the contribution instructions for more information. |
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching these, could you add tests?
r? @davidtwco |
@bors r+ |
Fix --extern library finding errors - `crate_name` is not specified/passed to `metadata_crate_location_unknown_type` https://github.com/rust-lang/rust/blob/c493bae0d8efd75723460ce5c371f726efa93f15/compiler/rustc_error_messages/locales/en-US/metadata.ftl#L274-L275 - `metadata_lib_filename_form` is missing `$` - Add additional check to ensure that library is file Testing 1. Create file `a.rs` ```rust extern crate t; fn main() {} ``` 1. Create empty file `x` 1. Create empty directory `y` 1. Run ```sh $ rustc -o a a.rs --extern t=x $ rustc -o a a.rs --extern t=y ``` Both currently panic with stable.
…earth Rollup of 6 pull requests Successful merges: - rust-lang#103488 (Allow opaque types in trait impl headers and rely on coherence to reject unsound cases) - rust-lang#104359 (Refactor must_use lint into two parts) - rust-lang#104612 (Lower return type outside async block creation) - rust-lang#104621 (Fix --extern library finding errors) - rust-lang#104647 (enable fuzzy_provenance_casts lint in liballoc and libstd) - rust-lang#104750 (Bump `fd-lock` in `bootstrap` again) Failed merges: - rust-lang#104732 (Refactor `ty::ClosureKind` related stuff) r? `@ghost` `@rustbot` modify labels: rollup
crate_name
is not specified/passed tometadata_crate_location_unknown_type
rust/compiler/rustc_error_messages/locales/en-US/metadata.ftl
Lines 274 to 275 in c493bae
metadata_lib_filename_form
is missing$
Testing
a.rs
x
y
Both currently panic with stable.