1
Fork 0

Change 'native' and 'crust' to 'extern'.

This comes with a terminology change. All linkage-symbols are 'extern'
now, including rust syms in other crates. Some extern ABIs are
merely "foreign". The term "native" is retired, not clear/useful.

What was "crust" is now "extern" applied to a _definition_. This
is a bit of an overloading, but should be unambiguous: it means
that the definition should be made available to some non-rust ABI.
This commit is contained in:
Graydon Hoare 2012-06-26 16:18:37 -07:00
parent 999b567e2a
commit 697f1e38d6
60 changed files with 377 additions and 353 deletions

View file

@ -63,7 +63,7 @@ fn moddoc_from_mod(
moddoc_from_mod(itemdoc, m)
))
}
ast::item_native_mod(nm) {
ast::item_foreign_mod(nm) {
some(doc::nmodtag(
nmoddoc_from_mod(itemdoc, nm)
))
@ -109,14 +109,14 @@ fn moddoc_from_mod(
fn nmoddoc_from_mod(
itemdoc: doc::itemdoc,
module: ast::native_mod
module: ast::foreign_mod
) -> doc::nmoddoc {
{
item: itemdoc,
fns: par::seqmap(module.items) {|item|
let itemdoc = mk_itemdoc(item.id, item.ident);
alt item.node {
ast::native_item_fn(_, _) {
ast::foreign_item_fn(_, _) {
fndoc_from_fn(itemdoc)
}
}
@ -290,13 +290,13 @@ mod test {
}
#[test]
fn extract_native_mods() {
fn extract_foreign_mods() {
let doc = mk_doc("native mod a { }");
assert doc.cratemod().nmods()[0].name() == "a";
}
#[test]
fn extract_fns_from_native_mods() {
fn extract_fns_from_foreign_mods() {
let doc = mk_doc("native mod a { fn a(); }");
assert doc.cratemod().nmods()[0].fns[0].name() == "a";
}