diff options
| author | Chris Morgan <me@chrismorgan.info> | 2013-10-29 17:22:49 +1100 |
|---|---|---|
| committer | Chris Morgan <me@chrismorgan.info> | 2013-11-03 23:49:01 +1100 |
| commit | 0369a41f0e668eda5622055253b91dbb5254f0b4 (patch) | |
| tree | 1cff913f7020f89a9441a0eb19d9e573329bba92 | |
| parent | 318e1da4a79533cf8040ef41dc1b1a2ef861906b (diff) | |
| download | rust-0369a41f0e668eda5622055253b91dbb5254f0b4.tar.gz rust-0369a41f0e668eda5622055253b91dbb5254f0b4.zip | |
Rename files to match current recommendations.
New standards have arisen in recent months, mostly for the use of rustpkg, but the main Rust codebase has not been altered to match these new specifications. This changeset rectifies most of these issues. - Renamed the crate source files `src/libX/X.rs` to `lib.rs`, for consistency with current styles; this affects extra, rustc, rustdoc, rustpkg, rustuv, std, syntax. - Renamed `X/X.rs` to `X/mod.rs,` as is now recommended style, for `std::num` and `std::terminfo`. - Shifted `src/libstd/str/ascii.rs` out of the otherwise unused `str` directory, to be consistent with its import path of `std::ascii`; libstd is flat at present so it's more appropriate thus. While this removes some `#[path = "..."]` directives, it does not remove all of them, and leaves certain other inconsistencies, such as `std::u8` et al. which are actually stored in `src/libstd/num/` (one subdirectory down). No quorum has been reached on this issue, so I felt it best to leave them all alone at present. #9208 deals with the possibility of making libstd more hierarchical (such as changing the crate to match the current filesystem structure, which would make the module path `std::num::u8`). There is one thing remaining in which this repository is not rustpkg-compliant: rustpkg would have `src/std/` et al. rather than `src/libstd/` et al. I have not endeavoured to change that at this point as it would guarantee prompt bitrot and confusion. A change of that magnitude needs to be discussed first.
| -rw-r--r-- | Makefile.in | 10 | ||||
| -rw-r--r-- | mk/tools.mk | 4 | ||||
| -rw-r--r-- | src/libextra/lib.rs (renamed from src/libextra/extra.rs) | 1 | ||||
| -rw-r--r-- | src/libextra/terminfo/mod.rs (renamed from src/libextra/terminfo/terminfo.rs) | 0 | ||||
| -rw-r--r-- | src/librustc/lib.rs (renamed from src/librustc/rustc.rs) | 0 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs (renamed from src/librustdoc/rustdoc.rs) | 0 | ||||
| -rw-r--r-- | src/librustpkg/lib.rs (renamed from src/librustpkg/rustpkg.rs) | 0 | ||||
| -rw-r--r-- | src/librustuv/lib.rs (renamed from src/librustuv/rustuv.rs) | 0 | ||||
| -rw-r--r-- | src/libstd/ascii.rs (renamed from src/libstd/str/ascii.rs) | 0 | ||||
| -rw-r--r-- | src/libstd/lib.rs (renamed from src/libstd/std.rs) | 2 | ||||
| -rw-r--r-- | src/libstd/num/mod.rs (renamed from src/libstd/num/num.rs) | 0 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs (renamed from src/libsyntax/syntax.rs) | 0 |
12 files changed, 7 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in index 65147b5e4eb..b927c805220 100644 --- a/Makefile.in +++ b/Makefile.in @@ -280,7 +280,7 @@ $(foreach target,$(CFG_TARGET),\ # Standard library variables ###################################################################### -STDLIB_CRATE := $(S)src/libstd/std.rs +STDLIB_CRATE := $(S)src/libstd/lib.rs STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \ *.rs */*.rs */*/*rs */*/*/*rs)) @@ -288,7 +288,7 @@ STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \ # Extra library variables ###################################################################### -EXTRALIB_CRATE := $(S)src/libextra/extra.rs +EXTRALIB_CRATE := $(S)src/libextra/lib.rs EXTRALIB_INPUTS := $(wildcard $(addprefix $(S)src/libextra/, \ *.rs */*.rs)) @@ -296,7 +296,7 @@ EXTRALIB_INPUTS := $(wildcard $(addprefix $(S)src/libextra/, \ # Rust UV library variables ###################################################################### -LIBRUSTUV_CRATE := $(S)src/librustuv/rustuv.rs +LIBRUSTUV_CRATE := $(S)src/librustuv/lib.rs LIBRUSTUV_INPUTS := $(wildcard $(addprefix $(S)src/librustuv/, \ *.rs */*.rs)) @@ -304,11 +304,11 @@ LIBRUSTUV_INPUTS := $(wildcard $(addprefix $(S)src/librustuv/, \ # rustc crate variables ###################################################################### -COMPILER_CRATE := $(S)src/librustc/rustc.rs +COMPILER_CRATE := $(S)src/librustc/lib.rs COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/librustc/, \ *.rs */*.rs */*/*.rs */*/*/*.rs)) -LIBSYNTAX_CRATE := $(S)src/libsyntax/syntax.rs +LIBSYNTAX_CRATE := $(S)src/libsyntax/lib.rs LIBSYNTAX_INPUTS := $(wildcard $(addprefix $(S)src/libsyntax/, \ *.rs */*.rs */*/*.rs */*/*/*.rs)) diff --git a/mk/tools.mk b/mk/tools.mk index fb2e0b6367c..5ae33cb7fab 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -16,11 +16,11 @@ COMPILETEST_CRATE := $(S)src/compiletest/compiletest.rs COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*.rs) # Rustpkg, the package manager and build system -RUSTPKG_LIB := $(S)src/librustpkg/rustpkg.rs +RUSTPKG_LIB := $(S)src/librustpkg/lib.rs RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*.rs) # Rustdoc, the documentation tool -RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rs +RUSTDOC_LIB := $(S)src/librustdoc/lib.rs RUSTDOC_INPUTS := $(wildcard $(addprefix $(S)src/librustdoc/, \ *.rs */*.rs */*/*.rs)) diff --git a/src/libextra/extra.rs b/src/libextra/lib.rs index 0e3b8a07127..2ac12373794 100644 --- a/src/libextra/extra.rs +++ b/src/libextra/lib.rs @@ -98,7 +98,6 @@ pub mod uuid; #[cfg(unicode)] mod unicode; -#[path="terminfo/terminfo.rs"] pub mod terminfo; // Compiler support modules diff --git a/src/libextra/terminfo/terminfo.rs b/src/libextra/terminfo/mod.rs index 06bf6e47c32..06bf6e47c32 100644 --- a/src/libextra/terminfo/terminfo.rs +++ b/src/libextra/terminfo/mod.rs diff --git a/src/librustc/rustc.rs b/src/librustc/lib.rs index ba27b5a5f41..ba27b5a5f41 100644 --- a/src/librustc/rustc.rs +++ b/src/librustc/lib.rs diff --git a/src/librustdoc/rustdoc.rs b/src/librustdoc/lib.rs index 770d535c6ea..770d535c6ea 100644 --- a/src/librustdoc/rustdoc.rs +++ b/src/librustdoc/lib.rs diff --git a/src/librustpkg/rustpkg.rs b/src/librustpkg/lib.rs index 517d43432ec..517d43432ec 100644 --- a/src/librustpkg/rustpkg.rs +++ b/src/librustpkg/lib.rs diff --git a/src/librustuv/rustuv.rs b/src/librustuv/lib.rs index 9119d1fb4e3..9119d1fb4e3 100644 --- a/src/librustuv/rustuv.rs +++ b/src/librustuv/lib.rs diff --git a/src/libstd/str/ascii.rs b/src/libstd/ascii.rs index ec2d7566177..ec2d7566177 100644 --- a/src/libstd/str/ascii.rs +++ b/src/libstd/ascii.rs diff --git a/src/libstd/std.rs b/src/libstd/lib.rs index 4500bae4c90..68f13dc8992 100644 --- a/src/libstd/std.rs +++ b/src/libstd/lib.rs @@ -122,7 +122,6 @@ pub mod vec; pub mod at_vec; pub mod str; -#[path = "str/ascii.rs"] pub mod ascii; pub mod send_str; @@ -143,7 +142,6 @@ pub mod rc; /* Common traits */ pub mod from_str; -#[path = "num/num.rs"] pub mod num; pub mod iter; pub mod to_str; diff --git a/src/libstd/num/num.rs b/src/libstd/num/mod.rs index 3097a8e138e..3097a8e138e 100644 --- a/src/libstd/num/num.rs +++ b/src/libstd/num/mod.rs diff --git a/src/libsyntax/syntax.rs b/src/libsyntax/lib.rs index cf2c01e92b4..cf2c01e92b4 100644 --- a/src/libsyntax/syntax.rs +++ b/src/libsyntax/lib.rs |
