Permalink
Browse files

Convert 'import' to 'use'. Remove 'import' keyword.

  • Loading branch information...
1 parent 1a8a0a7 commit 298eb8c7260fe321e30d9c5e22f4ecefc82c4f64 @brson brson committed Sep 8, 2012
Showing with 195 additions and 235 deletions.
  1. +0 −2 src/compiletest/common.rs
  2. +1 −1 src/compiletest/compiletest.rc
  3. +13 −17 src/compiletest/compiletest.rs
  4. +2 −2 src/compiletest/errors.rs
  5. +2 −5 src/compiletest/header.rs
  6. +3 −3 src/compiletest/procsrv.rs
  7. +10 −10 src/compiletest/runtest.rs
  8. +2 −3 src/compiletest/util.rs
  9. +3 −3 src/libcore/core.rc
  10. +1 −1 src/libcore/core.rs
  11. +4 −4 src/libcore/gc.rs
  12. +3 −3 src/libcore/int-template.rs
  13. +1 −1 src/libcore/libc.rs
  14. +39 −40 src/libcore/os.rs
  15. +2 −2 src/libcore/ptr.rs
  16. +1 −1 src/libcore/rt.rs
  17. +2 −2 src/libcore/run.rs
  18. +1 −1 src/libcore/send_map.rs
  19. +1 −1 src/libcore/str.rs
  20. +2 −2 src/libcore/uint-template.rs
  21. +1 −1 src/libstd/arc.rs
  22. +1 −1 src/libstd/c_vec.rs
  23. +2 −2 src/libstd/getopts.rs
  24. +1 −1 src/libstd/net_url.rs
  25. +0 −1 src/libstd/time.rs
  26. +1 −1 src/libstd/timer.rs
  27. +2 −4 src/libsyntax/ext/auto_serialize.rs
  28. +3 −3 src/libsyntax/ext/base.rs
  29. +2 −4 src/libsyntax/ext/pipes/ast_builder.rs
  30. +3 −5 src/libsyntax/ext/pipes/pipec.rs
  31. +0 −12 src/libsyntax/parse/parser.rs
  32. +2 −2 src/libsyntax/parse/token.rs
  33. +1 −1 src/libsyntax/print/pprust.rs
  34. +2 −2 src/rustc/driver/session.rs
  35. +4 −8 src/rustc/metadata.rs
  36. +1 −1 src/rustc/metadata/creader.rs
  37. +1 −1 src/rustc/middle/const_eval.rs
  38. +1 −1 src/rustc/middle/trans/base.rs
  39. +1 −1 src/rustc/middle/trans/reflect.rs
  40. +2 −2 src/rustdoc/astsrv.rs
  41. +5 −5 src/rustdoc/attr_parser.rs
  42. +1 −1 src/rustdoc/config.rs
  43. +2 −2 src/rustdoc/markdown_writer.rs
  44. +1 −1 src/rustdoc/prune_hidden_pass.rs
  45. +2 −2 src/rustdoc/rustdoc.rc
  46. +2 −2 src/test/bench/pingpong.rs
  47. +1 −1 src/test/bench/shootout-threadring.rs
  48. +3 −3 src/test/compile-fail/import-glob-circular.rs
  49. +1 −2 src/test/compile-fail/issue-2611-3.rs
  50. +1 −2 src/test/compile-fail/issue-2611-4.rs
  51. +1 −2 src/test/compile-fail/issue-2611-5.rs
  52. +1 −1 src/test/compile-fail/issue-2848.rs
  53. +1 −1 src/test/compile-fail/regions-glb-free-free.rs
  54. +2 −2 src/test/compile-fail/unused-imports-warn.rs
  55. +1 −1 src/test/run-pass/export-glob-imports-target.rs
  56. +1 −1 src/test/run-pass/export-glob.rs
  57. +0 −1 src/test/run-pass/hashmap-memory.rs
  58. +1 −1 src/test/run-pass/import-from-foreign.rs
  59. +3 −3 src/test/run-pass/import-glob-1.rs
  60. +2 −3 src/test/run-pass/import-in-block.rs
  61. +2 −2 src/test/run-pass/import.rs
  62. +1 −1 src/test/run-pass/import5.rs
  63. +1 −1 src/test/run-pass/import6.rs
  64. +1 −1 src/test/run-pass/import7.rs
  65. +1 −1 src/test/run-pass/issue-2718.rs
  66. +1 −2 src/test/run-pass/mod-view-items.rs
  67. +3 −3 src/test/run-pass/module-polymorphism.rc
  68. +6 −6 src/test/run-pass/module-polymorphism2.rc
  69. +3 −3 src/test/run-pass/module-polymorphism3.rc
  70. +2 −2 src/test/run-pass/module-polymorphism4.rc
  71. +2 −2 src/test/run-pass/pipe-bank-proto.rs
  72. +5 −5 src/test/run-pass/pipe-pingpong-bounded.rs
  73. +4 −4 src/test/run-pass/pipe-pingpong-proto.rs
  74. +1 −1 src/test/run-pass/pipe-select-macro.rs
  75. +2 −2 src/test/run-pass/pipe-select.rs
  76. +1 −1 src/test/run-pass/pipe-sleep.rs
  77. +1 −1 src/test/run-pass/self-shadowing-import.rs
  78. +2 −2 src/test/run-pass/use.rs
@@ -1,5 +1,3 @@
-import option;
-
enum mode { mode_compile_fail, mode_run_fail, mode_run_pass, mode_pretty, }
impl mode : cmp::Eq {
@@ -7,7 +7,7 @@
use core(vers = "0.4");
use std(vers = "0.4");
-import core::*;
+use core::*;
mod procsrv;
mod util;
@@ -1,20 +1,16 @@
-import option;
-import std::getopts;
-import std::test;
-import str;
-import vec;
-import task;
-
-import core::result;
-import result::{Ok, Err};
-
-import common::config;
-import common::mode_run_pass;
-import common::mode_run_fail;
-import common::mode_compile_fail;
-import common::mode_pretty;
-import common::mode;
-import util::logv;
+use std::getopts;
+use std::test;
+
+use core::result;
+use result::{Ok, Err};
+
+use common::config;
+use common::mode_run_pass;
+use common::mode_run_fail;
+use common::mode_compile_fail;
+use common::mode_pretty;
+use common::mode;
+use util::logv;
fn main(args: ~[~str]) {
let config = parse_config(args);
@@ -1,5 +1,5 @@
-import common::config;
-import io::ReaderUtil;
+use common::config;
+use io::ReaderUtil;
export load_errors;
export expected_error;
@@ -1,8 +1,5 @@
-import option;
-import str;
-
-import common::config;
-import io::ReaderUtil;
+use common::config;
+use io::ReaderUtil;
export test_props;
export load_props;
@@ -1,6 +1,6 @@
-import run::spawn_process;
-import io::{ReaderUtil, WriterUtil};
-import libc::{c_int, pid_t};
+use run::spawn_process;
+use io::{ReaderUtil, WriterUtil};
+use libc::{c_int, pid_t};
export run;
View
@@ -1,13 +1,13 @@
-import io::WriterUtil;
-
-import common::mode_run_pass;
-import common::mode_run_fail;
-import common::mode_compile_fail;
-import common::mode_pretty;
-import common::config;
-import header::load_props;
-import header::test_props;
-import util::logv;
+use io::WriterUtil;
+
+use common::mode_run_pass;
+use common::mode_run_fail;
+use common::mode_compile_fail;
+use common::mode_pretty;
+use common::config;
+use header::load_props;
+use header::test_props;
+use util::logv;
export run;
View
@@ -1,7 +1,6 @@
-import option;
-import os::getenv;
+use os::getenv;
-import common::config;
+use common::config;
fn make_new_path(path: ~str) -> ~str {
View
@@ -75,7 +75,7 @@ export priv;
/// Operations and constants for `int`
#[path = "int-template"]
mod int {
- import inst::{ hash, pow };
+ use inst::{ hash, pow };
export hash, pow;
#[path = "int.rs"]
mod inst;
@@ -112,7 +112,7 @@ mod i64 {
/// Operations and constants for `uint`
#[path = "uint-template"]
mod uint {
- import inst::{
+ use inst::{
div_ceil, div_round, div_floor, hash, iterate,
next_power_of_two
};
@@ -126,7 +126,7 @@ mod uint {
/// Operations and constants for `u8`
#[path = "uint-template"]
mod u8 {
- import inst::is_ascii;
+ use inst::is_ascii;
export is_ascii;
#[path = "u8.rs"]
View
@@ -97,7 +97,7 @@ mod core {
#[cfg(test)]
mod std {
use std(vers = "0.4");
- import std::test;
+ use std::test;
}
/**
View
@@ -25,10 +25,10 @@ with destructors.
*/
-import stackwalk::Word;
-import libc::size_t;
-import libc::uintptr_t;
-import send_map::linear::LinearMap;
+use stackwalk::Word;
+use libc::size_t;
+use libc::uintptr_t;
+use send_map::linear::LinearMap;
export Word;
export gc;
@@ -210,7 +210,7 @@ fn test_from_str() {
#[test]
#[ignore]
fn test_parse_buf() {
- import str::to_bytes;
+ use str::to_bytes;
assert parse_buf(to_bytes(~"123"), 10u) == Some(123 as T);
assert parse_buf(to_bytes(~"1001"), 2u) == Some(9 as T);
assert parse_buf(to_bytes(~"123"), 8u) == Some(83 as T);
@@ -263,7 +263,7 @@ fn test_interfaces() {
#[test]
fn test_times() {
- import iter::Times;
+ use iter::Times;
let ten = 10 as T;
let mut accum = 0;
for ten.times { accum += 1; }
@@ -274,6 +274,6 @@ fn test_times() {
#[should_fail]
#[ignore(cfg(windows))]
fn test_times_negative() {
- import iter::Times;
+ use iter::Times;
for (-10).times { log(error, ~"nope!"); }
}
View
@@ -1143,7 +1143,7 @@ mod funcs {
#[cfg(target_os = "win32")]
mod extra {
- import types::os::arch::extra::*;
+ use types::os::arch::extra::*;
#[abi = "stdcall"]
extern mod kernel32 {
Oops, something went wrong.

0 comments on commit 298eb8c

Please sign in to comment.