rust/src
bors 712c630ab6 auto merge of #12300 : DaGenix/rust/uppercase-variable-lint, r=alexcrichton
I added a new lint for variables whose names contain uppercase characters, since, by convention, variable names should be all lowercase. What motivated me to work on this was when I ran into something like the following:

```rust
use std::io::File;
use std::io::IoError;

fn main() {
    let mut f = File::open(&Path::new("/something.txt"));
    let mut buff = [0u8, ..16];
    match f.read(buff) {
        Ok(cnt) => println!("read this many bytes: {}", cnt),
        Err(IoError{ kind: EndOfFile, .. }) => println!("Got end of file: {}", EndOfFile.to_str()),
    }
}
```

I then got compile errors when I tried to add a wildcard match pattern at the end which I found very confusing since I believed that the 2nd match arm was only matching the EndOfFile condition. The problem is that I hadn't imported io::EndOfFile into the local scope. So, I thought that I was using EndOfFile as a sub-pattern, however, what I was actually doing was creating a new local variable named EndOfFile. This lint makes this error easier to spot by providing a warning that the variable name EndOfFile contains a uppercase characters which provides a nice hint as to why the code isn't doing what is intended.

The lint warns on local bindings as well:

```rust
let Hi = 0;
```

And also struct fields:

```rust
struct Something {
    X: uint
}
```
2014-03-04 22:06:38 -08:00
..
compiler-rt@f4b221571c
compiletest Rename all variables that have uppercase characters in their names to use only lowercase characters 2014-03-04 21:23:36 -05:00
doc doc: use the newer favicon 2014-03-04 18:37:51 +01:00
driver
etc auto merge of #12663 : MicahChalmer/rust/emacs-remove-ws-bug-warning, r=brson 2014-03-02 20:56:30 -08:00
gyp@1e46da1000
libarena
libcollections
libextra doc: use the newer favicon 2014-03-04 18:37:51 +01:00
libflate
libfourcc libfourcc: Fix errors arising from the automated ~[T] conversion 2014-03-01 22:40:53 -08:00
libgetopts
libglob
libgreen auto merge of #12667 : Kimundi/rust/any_improv, r=cmr 2014-03-04 13:16:41 -08:00
libnative auto merge of #12667 : Kimundi/rust/any_improv, r=cmr 2014-03-04 13:16:41 -08:00
libnum Rename all variables that have uppercase characters in their names to use only lowercase characters 2014-03-04 21:23:36 -05:00
librustc auto merge of #12300 : DaGenix/rust/uppercase-variable-lint, r=alexcrichton 2014-03-04 22:06:38 -08:00
librustdoc rustdoc: tweak highlighting 2014-03-04 18:37:09 +01:00
librustuv
libsemver
libserialize Rename all variables that have uppercase characters in their names to use only lowercase characters 2014-03-04 21:23:36 -05:00
libstd auto merge of #12300 : DaGenix/rust/uppercase-variable-lint, r=alexcrichton 2014-03-04 22:06:38 -08:00
libsync Rename all variables that have uppercase characters in their names to use only lowercase characters 2014-03-04 21:23:36 -05:00
libsyntax auto merge of #12300 : DaGenix/rust/uppercase-variable-lint, r=alexcrichton 2014-03-04 22:06:38 -08:00
libterm doc: use the newer favicon 2014-03-04 18:37:51 +01:00
libtest
libtime
libuuid
libuv@800b56fe6a
llvm@263c617d66
rt
rustllvm
test auto merge of #12300 : DaGenix/rust/uppercase-variable-lint, r=alexcrichton 2014-03-04 22:06:38 -08:00
README.md
snapshots.txt Register new snapshots 2014-03-03 18:00:52 -08:00

This is a preliminary version of the Rust compiler, libraries and tools.

Source layout:

Path Description
librustc/ The self-hosted compiler
libstd/ The standard library (imported and linked by default)
libextra/ The "extras" library (slightly more peripheral code)
libgreen/ The M:N runtime library
libnative/ The 1:1 runtime library
libsyntax/ The Rust parser and pretty-printer
libcollections/ A collection of useful data structures and containers
libnum/ Extended number support library (complex, rational, etc)
libtest/ Rust's test-runner code
------------------- ---------------------------------------------------------
libarena/ The arena (a fast but limited) memory allocator
libflate/ Simple compression library
libfourcc/ Data format identifier library
libgetopts/ Get command-line-options library
libglob/ Unix glob patterns library
libsemver/ Rust's semantic versioning library
libserialize/ Encode-Decode types library
libsync/ Concurrency mechanisms and primitives
libterm/ ANSI color library for terminals
libtime/ Time operations library
libuuid/ UUID's handling code
------------------- ---------------------------------------------------------
rt/ The runtime system
rt/rust_*.c - Some of the runtime services
rt/vg - Valgrind headers
rt/msvc - MSVC support
rt/sundown - The Markdown library used by rustdoc
------------------- ---------------------------------------------------------
compiletest/ The test runner
test/ Testsuite
test/codegen - Tests for the LLVM IR infrastructure
test/compile-fail - Tests that should fail to compile
test/debug-info - Tests for the debuginfo tool
test/run-fail - Tests that should compile, run and fail
test/run-make - Tests that depend on a Makefile infrastructure
test/run-pass - Tests that should compile, run and succeed
test/bench - Benchmarks and miscellaneous
test/pretty - Pretty-printer tests
test/auxiliary - Dependencies of tests
------------------- ---------------------------------------------------------
librustdoc/ The Rust API documentation tool
libuv/ The libuv submodule
librustuv/ Rust libuv support code
------------------- ---------------------------------------------------------
llvm/ The LLVM submodule
rustllvm/ LLVM support code
------------------- ---------------------------------------------------------
etc/ Scripts, editors support, misc

NOTE: This list (especially the second part of the table which contains modules and libraries) is highly volatile and subject to change.