Skip to content

Commit 298eb8c

Browse files
committed
Convert 'import' to 'use'. Remove 'import' keyword.
1 parent 1a8a0a7 commit 298eb8c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+195
-235
lines changed

src/compiletest/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import option;
2-
31
enum mode { mode_compile_fail, mode_run_fail, mode_run_pass, mode_pretty, }
42

53
impl mode : cmp::Eq {

src/compiletest/compiletest.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use core(vers = "0.4");
88
use std(vers = "0.4");
99

10-
import core::*;
10+
use core::*;
1111

1212
mod procsrv;
1313
mod util;

src/compiletest/compiletest.rs

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import option;
2-
import std::getopts;
3-
import std::test;
4-
import str;
5-
import vec;
6-
import task;
7-
8-
import core::result;
9-
import result::{Ok, Err};
10-
11-
import common::config;
12-
import common::mode_run_pass;
13-
import common::mode_run_fail;
14-
import common::mode_compile_fail;
15-
import common::mode_pretty;
16-
import common::mode;
17-
import util::logv;
1+
use std::getopts;
2+
use std::test;
3+
4+
use core::result;
5+
use result::{Ok, Err};
6+
7+
use common::config;
8+
use common::mode_run_pass;
9+
use common::mode_run_fail;
10+
use common::mode_compile_fail;
11+
use common::mode_pretty;
12+
use common::mode;
13+
use util::logv;
1814

1915
fn main(args: ~[~str]) {
2016
let config = parse_config(args);

src/compiletest/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import common::config;
2-
import io::ReaderUtil;
1+
use common::config;
2+
use io::ReaderUtil;
33

44
export load_errors;
55
export expected_error;

src/compiletest/header.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import option;
2-
import str;
3-
4-
import common::config;
5-
import io::ReaderUtil;
1+
use common::config;
2+
use io::ReaderUtil;
63

74
export test_props;
85
export load_props;

src/compiletest/procsrv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import run::spawn_process;
2-
import io::{ReaderUtil, WriterUtil};
3-
import libc::{c_int, pid_t};
1+
use run::spawn_process;
2+
use io::{ReaderUtil, WriterUtil};
3+
use libc::{c_int, pid_t};
44

55
export run;
66

src/compiletest/runtest.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import io::WriterUtil;
2-
3-
import common::mode_run_pass;
4-
import common::mode_run_fail;
5-
import common::mode_compile_fail;
6-
import common::mode_pretty;
7-
import common::config;
8-
import header::load_props;
9-
import header::test_props;
10-
import util::logv;
1+
use io::WriterUtil;
2+
3+
use common::mode_run_pass;
4+
use common::mode_run_fail;
5+
use common::mode_compile_fail;
6+
use common::mode_pretty;
7+
use common::config;
8+
use header::load_props;
9+
use header::test_props;
10+
use util::logv;
1111

1212
export run;
1313

src/compiletest/util.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import option;
2-
import os::getenv;
1+
use os::getenv;
32

4-
import common::config;
3+
use common::config;
54

65
fn make_new_path(path: ~str) -> ~str {
76

src/libcore/core.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export priv;
7575
/// Operations and constants for `int`
7676
#[path = "int-template"]
7777
mod int {
78-
import inst::{ hash, pow };
78+
use inst::{ hash, pow };
7979
export hash, pow;
8080
#[path = "int.rs"]
8181
mod inst;
@@ -112,7 +112,7 @@ mod i64 {
112112
/// Operations and constants for `uint`
113113
#[path = "uint-template"]
114114
mod uint {
115-
import inst::{
115+
use inst::{
116116
div_ceil, div_round, div_floor, hash, iterate,
117117
next_power_of_two
118118
};
@@ -126,7 +126,7 @@ mod uint {
126126
/// Operations and constants for `u8`
127127
#[path = "uint-template"]
128128
mod u8 {
129-
import inst::is_ascii;
129+
use inst::is_ascii;
130130
export is_ascii;
131131

132132
#[path = "u8.rs"]

src/libcore/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ mod core {
9797
#[cfg(test)]
9898
mod std {
9999
use std(vers = "0.4");
100-
import std::test;
100+
use std::test;
101101
}
102102

103103
/**

src/libcore/gc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ with destructors.
2525
2626
*/
2727

28-
import stackwalk::Word;
29-
import libc::size_t;
30-
import libc::uintptr_t;
31-
import send_map::linear::LinearMap;
28+
use stackwalk::Word;
29+
use libc::size_t;
30+
use libc::uintptr_t;
31+
use send_map::linear::LinearMap;
3232

3333
export Word;
3434
export gc;

src/libcore/int-template.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ fn test_from_str() {
210210
#[test]
211211
#[ignore]
212212
fn test_parse_buf() {
213-
import str::to_bytes;
213+
use str::to_bytes;
214214
assert parse_buf(to_bytes(~"123"), 10u) == Some(123 as T);
215215
assert parse_buf(to_bytes(~"1001"), 2u) == Some(9 as T);
216216
assert parse_buf(to_bytes(~"123"), 8u) == Some(83 as T);
@@ -263,7 +263,7 @@ fn test_interfaces() {
263263

264264
#[test]
265265
fn test_times() {
266-
import iter::Times;
266+
use iter::Times;
267267
let ten = 10 as T;
268268
let mut accum = 0;
269269
for ten.times { accum += 1; }
@@ -274,6 +274,6 @@ fn test_times() {
274274
#[should_fail]
275275
#[ignore(cfg(windows))]
276276
fn test_times_negative() {
277-
import iter::Times;
277+
use iter::Times;
278278
for (-10).times { log(error, ~"nope!"); }
279279
}

src/libcore/libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ mod funcs {
11431143

11441144
#[cfg(target_os = "win32")]
11451145
mod extra {
1146-
import types::os::arch::extra::*;
1146+
use types::os::arch::extra::*;
11471147

11481148
#[abi = "stdcall"]
11491149
extern mod kernel32 {

0 commit comments

Comments
 (0)