Closed
Description
For example, consider a crate demo
:
pub fn f() -> foo::Bar { foo::Bar }
mod foo {
pub struct Bar;
impl Bar {
pub fn baz(&self) {}
}
}
and another crate that uses demo
:
extern crate demo;
fn main() {
demo::f().baz();
}
Here, demo::foo::Bar
is unnameable in the other crate.
Compiling the other crate will cause an error:
error: linking with `cc` failed: exit code: 1
note: /home/ubuntu/demo/target/debug/examples/example.0.o: In function `example::main':
/home/ubuntu/demo/examples/example.rs:4: undefined reference to `foo::Bar::baz::h2fcc0e6532120868paa'
collect2: error: ld returned 1 exit status
Metadata
Metadata
Assignees
Labels
No labels