-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
If a crate is created as a staticlib, which is for linking against C programs, the error message that is gotten when trying to use that create from Rust is:
foo.rs:3:1: 3:26 error: can't find crate for `bar`
foo.rs:3 extern crate bar;
^~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
It would be better if the error message were:
foo.rs:3:1: 3:26 error: found staticlib `bar` instead of rlib `bar`, please compile using --crate-type rlib instead.
foo.rs:3 extern crate bar;
^~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Or something similarly useful.
Thanks.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.