Closed
Description
I just came across a weird case where rustc would not warn that a given extern dependency could not be found. I believe it should just warn the user or throw an error in that case instead of silently ignoring the error. It seems like the dependencies are only checked on a per-use basis whereas I believe being more strict here would probably not harm and help users find issues earlier.
Reproducer
$ echo 'fn main() {}' > foo.rs
$ rustc foo.rs --extern something=asdlflaksdjfljsaljfdlaskjdf
What happened
It did compile my trivial program without any issues.
Expected output
The compiler should have warned or thrown an error about the missing something
dependency. Alternatively warned about an unused dependency that was provided.