From fa2fb0f86831c7bdb1c874eb49074d11640d5cf9 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 5 Sep 2012 10:41:47 -0700 Subject: [PATCH] rustdoc: "import" -> "use" --- src/rustdoc/astsrv.rs | 26 +++++++++++++------------- src/rustdoc/attr_parser.rs | 6 +++--- src/rustdoc/attr_pass.rs | 10 +++++----- src/rustdoc/config.rs | 4 ++-- src/rustdoc/desc_to_brief_pass.rs | 2 +- src/rustdoc/extract.rs | 4 ++-- src/rustdoc/markdown_index_pass.rs | 2 +- src/rustdoc/markdown_pass.rs | 8 ++++---- src/rustdoc/markdown_writer.rs | 4 ++-- src/rustdoc/page_pass.rs | 4 ++-- src/rustdoc/parse.rs | 14 +++++++------- src/rustdoc/path_pass.rs | 4 ++-- src/rustdoc/prune_hidden_pass.rs | 4 ++-- src/rustdoc/rustdoc.rs | 6 +++--- src/rustdoc/sectionalize_pass.rs | 2 +- src/rustdoc/sort_item_name_pass.rs | 2 +- src/rustdoc/sort_item_type_pass.rs | 2 +- src/rustdoc/sort_pass.rs | 4 ++-- src/rustdoc/text_pass.rs | 2 +- src/rustdoc/trim_pass.rs | 2 +- src/rustdoc/tystr_pass.rs | 12 ++++++------ 21 files changed, 62 insertions(+), 62 deletions(-) diff --git a/src/rustdoc/astsrv.rs b/src/rustdoc/astsrv.rs index 027a0f275bd..a68f998e6fe 100644 --- a/src/rustdoc/astsrv.rs +++ b/src/rustdoc/astsrv.rs @@ -7,19 +7,19 @@ Rustdoc from its non-sendableness." )]; -import std::map::hashmap; -import rustc::driver::session; -import session::{basic_options, options}; -import session::session; -import rustc::driver::driver; -import syntax::diagnostic; -import syntax::diagnostic::handler; -import syntax::ast; -import syntax::codemap; -import syntax::ast_map; -import rustc::back::link; -import rustc::metadata::filesearch; -import rustc::front; +use std::map::hashmap; +use rustc::driver::session; +use session::{basic_options, options}; +use session::session; +use rustc::driver::driver; +use syntax::diagnostic; +use syntax::diagnostic::handler; +use syntax::ast; +use syntax::codemap; +use syntax::ast_map; +use rustc::back::link; +use rustc::metadata::filesearch; +use rustc::front; export ctxt; export ctxt_handler; diff --git a/src/rustdoc/attr_parser.rs b/src/rustdoc/attr_parser.rs index b22c66e1025..8663e377c0d 100644 --- a/src/rustdoc/attr_parser.rs +++ b/src/rustdoc/attr_parser.rs @@ -5,9 +5,9 @@ an AST's attributes." )]; -import syntax::ast; -import syntax::attr; -import core::tuple; +use syntax::ast; +use syntax::attr; +use core::tuple; export crate_attrs; export parse_crate, parse_desc; diff --git a/src/rustdoc/attr_pass.rs b/src/rustdoc/attr_pass.rs index 7e4d89e5bb4..d93e49aa841 100644 --- a/src/rustdoc/attr_pass.rs +++ b/src/rustdoc/attr_pass.rs @@ -6,11 +6,11 @@ of the natural-language documentation for a crate." )]; -import doc::item_utils; -import extract::to_str; -import syntax::ast; -import syntax::ast_map; -import std::map::hashmap; +use doc::item_utils; +use extract::to_str; +use syntax::ast; +use syntax::ast_map; +use std::map::hashmap; export mk_pass; diff --git a/src/rustdoc/config.rs b/src/rustdoc/config.rs index d30e41590f7..f5d1bea493b 100644 --- a/src/rustdoc/config.rs +++ b/src/rustdoc/config.rs @@ -1,5 +1,5 @@ -import result::Result; -import std::getopts; +use result::Result; +use std::getopts; export output_format; export output_style; diff --git a/src/rustdoc/desc_to_brief_pass.rs b/src/rustdoc/desc_to_brief_pass.rs index cfccae19833..05e4b99f3a8 100644 --- a/src/rustdoc/desc_to_brief_pass.rs +++ b/src/rustdoc/desc_to_brief_pass.rs @@ -5,7 +5,7 @@ * is interpreted as the brief description. */ -import doc::item_utils; +use doc::item_utils; export mk_pass; diff --git a/src/rustdoc/extract.rs b/src/rustdoc/extract.rs index f0286b5948b..f379231bcd0 100644 --- a/src/rustdoc/extract.rs +++ b/src/rustdoc/extract.rs @@ -1,7 +1,7 @@ //! Converts the Rust AST to the rustdoc document model -import syntax::ast; -import doc::item_utils; +use syntax::ast; +use doc::item_utils; export from_srv, extract, to_str, interner; diff --git a/src/rustdoc/markdown_index_pass.rs b/src/rustdoc/markdown_index_pass.rs index 6897f3b2938..172147b1f24 100644 --- a/src/rustdoc/markdown_index_pass.rs +++ b/src/rustdoc/markdown_index_pass.rs @@ -1,6 +1,6 @@ //! Build indexes as appropriate for the markdown pass -import doc::item_utils; +use doc::item_utils; export mk_pass; diff --git a/src/rustdoc/markdown_pass.rs b/src/rustdoc/markdown_pass.rs index cd743e5609d..03726ca0188 100644 --- a/src/rustdoc/markdown_pass.rs +++ b/src/rustdoc/markdown_pass.rs @@ -1,9 +1,9 @@ //! Generate markdown from a document tree -import doc::item_utils; -import markdown_writer::writer; -import markdown_writer::writer_utils; -import markdown_writer::writer_factory; +use doc::item_utils; +use markdown_writer::writer; +use markdown_writer::writer_utils; +use markdown_writer::writer_factory; export mk_pass; export header_kind, header_name, header_text; diff --git a/src/rustdoc/markdown_writer.rs b/src/rustdoc/markdown_writer.rs index b44ba7bcb44..c9d7fe0adb7 100644 --- a/src/rustdoc/markdown_writer.rs +++ b/src/rustdoc/markdown_writer.rs @@ -1,5 +1,5 @@ -import doc::item_utils; -import io::ReaderUtil; +use doc::item_utils; +use io::ReaderUtil; export writeinstr; export writer; diff --git a/src/rustdoc/page_pass.rs b/src/rustdoc/page_pass.rs index a8500c8e400..48972173278 100644 --- a/src/rustdoc/page_pass.rs +++ b/src/rustdoc/page_pass.rs @@ -5,8 +5,8 @@ * individual modules, pages for the crate, indexes, etc. */ -import doc::{item_utils, page_utils}; -import syntax::ast; +use doc::{item_utils, page_utils}; +use syntax::ast; export mk_pass; diff --git a/src/rustdoc/parse.rs b/src/rustdoc/parse.rs index 55609b3daf6..59d64f18d59 100644 --- a/src/rustdoc/parse.rs +++ b/src/rustdoc/parse.rs @@ -1,12 +1,12 @@ //! AST-parsing helpers -import rustc::driver::driver; -import driver::{file_input, str_input}; -import rustc::driver::session; -import syntax::diagnostic; -import syntax::ast; -import syntax::codemap; -import syntax::parse; +use rustc::driver::driver; +use driver::{file_input, str_input}; +use rustc::driver::session; +use syntax::diagnostic; +use syntax::ast; +use syntax::codemap; +use syntax::parse; export from_file, from_str, from_file_sess, from_str_sess; diff --git a/src/rustdoc/path_pass.rs b/src/rustdoc/path_pass.rs index 23cd67cf875..c1adbb555fb 100644 --- a/src/rustdoc/path_pass.rs +++ b/src/rustdoc/path_pass.rs @@ -1,7 +1,7 @@ //! Records the full path to items -import doc::item_utils; -import syntax::ast; +use doc::item_utils; +use syntax::ast; export mk_pass; diff --git a/src/rustdoc/prune_hidden_pass.rs b/src/rustdoc/prune_hidden_pass.rs index af0c8a19702..7acca3aed47 100644 --- a/src/rustdoc/prune_hidden_pass.rs +++ b/src/rustdoc/prune_hidden_pass.rs @@ -1,7 +1,7 @@ //! Prunes things with the #[doc(hidden)] attribute -import doc::item_utils; -import std::map::hashmap; +use doc::item_utils; +use std::map::hashmap; export mk_pass; fn mk_pass() -> pass { diff --git a/src/rustdoc/rustdoc.rs b/src/rustdoc/rustdoc.rs index c3f6bc476c1..0b1750348e1 100755 --- a/src/rustdoc/rustdoc.rs +++ b/src/rustdoc/rustdoc.rs @@ -1,7 +1,7 @@ // Some utility interfaces -import doc::item_utils; -import doc::item; -import doc::util; +use doc::item_utils; +use doc::item; +use doc::util; /// A single operation on the document model type pass = { diff --git a/src/rustdoc/sectionalize_pass.rs b/src/rustdoc/sectionalize_pass.rs index 1a156b9d2a3..502349df91f 100644 --- a/src/rustdoc/sectionalize_pass.rs +++ b/src/rustdoc/sectionalize_pass.rs @@ -1,6 +1,6 @@ //! Breaks rustdocs into sections according to their headers -import doc::item_utils; +use doc::item_utils; export mk_pass; diff --git a/src/rustdoc/sort_item_name_pass.rs b/src/rustdoc/sort_item_name_pass.rs index 4f3280b353f..f50f6e8d5b0 100644 --- a/src/rustdoc/sort_item_name_pass.rs +++ b/src/rustdoc/sort_item_name_pass.rs @@ -1,6 +1,6 @@ //! Sorts items by name -import doc::item_utils; +use doc::item_utils; export mk_pass; fn mk_pass() -> pass { diff --git a/src/rustdoc/sort_item_type_pass.rs b/src/rustdoc/sort_item_type_pass.rs index 1ea88f01dbb..f58a5a17d06 100644 --- a/src/rustdoc/sort_item_type_pass.rs +++ b/src/rustdoc/sort_item_type_pass.rs @@ -1,6 +1,6 @@ //! Sorts items by type -import doc::item_utils; +use doc::item_utils; export mk_pass; diff --git a/src/rustdoc/sort_pass.rs b/src/rustdoc/sort_pass.rs index 971b3200be1..1a902ae5771 100644 --- a/src/rustdoc/sort_pass.rs +++ b/src/rustdoc/sort_pass.rs @@ -1,7 +1,7 @@ //! A general sorting pass -import doc::item_utils; -import std::sort; +use doc::item_utils; +use std::sort; export item_lteq, mk_pass; diff --git a/src/rustdoc/text_pass.rs b/src/rustdoc/text_pass.rs index e82abf46795..329976c944e 100644 --- a/src/rustdoc/text_pass.rs +++ b/src/rustdoc/text_pass.rs @@ -1,6 +1,6 @@ //! Generic pass for performing an operation on all descriptions -import doc::item_utils; +use doc::item_utils; export mk_pass; diff --git a/src/rustdoc/trim_pass.rs b/src/rustdoc/trim_pass.rs index 15fe6d3fc6b..193ffb0fe07 100644 --- a/src/rustdoc/trim_pass.rs +++ b/src/rustdoc/trim_pass.rs @@ -5,7 +5,7 @@ * is interpreted as the brief description. */ -import doc::item_utils; +use doc::item_utils; export mk_pass; diff --git a/src/rustdoc/tystr_pass.rs b/src/rustdoc/tystr_pass.rs index 518d0ae565f..3ea9d0fa81b 100644 --- a/src/rustdoc/tystr_pass.rs +++ b/src/rustdoc/tystr_pass.rs @@ -1,11 +1,11 @@ //! Pulls type information out of the AST and attaches it to the document -import doc::item_utils; -import syntax::ast; -import syntax::print::pprust; -import syntax::ast_map; -import std::map::hashmap; -import extract::to_str; +use doc::item_utils; +use syntax::ast; +use syntax::print::pprust; +use syntax::ast_map; +use std::map::hashmap; +use extract::to_str; export mk_pass;