Crate the first
#[link(name = "crate_method_reexport_grrrrrrr2")];
export rust;
import name_pool::methods;
mod name_pool {
import libc::c_char;
type name_pool = @{
mut strbufs: ~[str]
};
fn name_pool() -> name_pool {
@{mut strbufs: ~[]}
}
impl methods for name_pool {
fn add(-s: str) -> *c_char {
let c_str = str::as_c_str(s, |bytes| bytes);
self.strbufs += ~[s]; // in theory, this should *move* the str in here..
ret c_str; // ...and so this ptr ought to be valid.
}
}
}
mod rust {
export rt;
export methods;
type rt = @();
impl methods for rt {
fn cx() {
}
}
}
Crate the second
// aux-build:crate-method-reexport-grrrrrrr2.rs
use crate_method_reexport_grrrrrrr2;
fn main() {
import crate_method_reexport_grrrrrrr2::rust::methods;
let x = @();
x.cx();
}
This runs into missing metadata, presumably because name_pool::methods isn't reachable.
Crate the first
Crate the second
This runs into missing metadata, presumably because
name_pool::methodsisn't reachable.