extern mod => extern crate

This was previously implemented, and it just needed a snapshot to go through
This commit is contained in:
Alex Crichton 2014-02-14 10:10:06 -08:00
parent 359ac360a4
commit a41b0c2529
438 changed files with 682 additions and 685 deletions

View file

@ -1021,7 +1021,7 @@ fn item_module(w: &mut Writer, cx: &Context,
clean::ViewItemItem(ref item) => {
match item.inner {
clean::ExternMod(ref name, ref src, _) => {
if_ok!(write!(w, "<tr><td><code>extern mod {}",
if_ok!(write!(w, "<tr><td><code>extern crate {}",
name.as_slice()));
match *src {
Some(ref src) => if_ok!(write!(w, " = \"{}\"",

View file

@ -15,13 +15,13 @@
#[feature(globs, struct_variant, managed_boxes)];
extern mod syntax;
extern mod rustc;
extern mod extra;
extern mod serialize;
extern mod sync;
extern mod getopts;
extern mod collections;
extern crate syntax;
extern crate rustc;
extern crate extra;
extern crate serialize;
extern crate sync;
extern crate getopts;
extern crate collections;
use std::local_data;
use std::io;

View file

@ -144,10 +144,10 @@ fn maketest(s: &str, cratename: &str) -> ~str {
#[allow(unused_variable, dead_assignment, unused_mut, attribute_usage, dead_code)];
";
if s.contains("extra") {
prog.push_str("extern mod extra;\n");
prog.push_str("extern crate extra;\n");
}
if s.contains(cratename) {
prog.push_str(format!("extern mod {};\n", cratename));
prog.push_str(format!("extern crate {};\n", cratename));
}
if s.contains("fn main") {
prog.push_str(s);