Hi @all,
$ rustc --version
rustc 1.21.0 (3b72af97e 2017-10-09)
fn f() {
extern crate foo;
}
this compiles
fn f() {
extern crate foo;
use foo::{bar};
}
this does not compile and gives an error
68 | use foo::{bar};
| ^^^^^^^^ Maybe a missing extern crate foo;
?
after adding "extern crate foo;" at top level before f this error can be resovled.
Is this behavour by design?
I would expect that either "extern crate foo;" should not compile when used inside f OR
it should compile and allow "use foo::{bar};"
Has this been already discussed?
Regards,
Daniel