Skip to content

Commit 2144be1

Browse files
committed
---
yaml --- r: 148966 b: refs/heads/try2 c: 730bdb6 h: refs/heads/master v: v3
1 parent 1bb3c52 commit 2144be1

File tree

331 files changed

+2744
-196
lines changed

Some content is hidden

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

331 files changed

+2744
-196
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ca40da8b55a04394f1db11b6c7410e49b63c6e04
8+
refs/heads/try2: 730bdb6403dd47b98c1be6c4b3423edb28ca9477
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/tests.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ ALL_HS := $(filter-out $(S)src/rt/vg/valgrind.h \
242242
tidy:
243243
@$(call E, check: formatting)
244244
$(Q)find $(S)src -name '*.r[sc]' \
245-
| grep '^$(S)src/test' -v \
246245
| grep '^$(S)src/libuv' -v \
247246
| grep '^$(S)src/llvm' -v \
248247
| grep '^$(S)src/gyp' -v \

branches/try2/src/etc/tidy.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
err=0
1616
cols=100
17+
cr_flag="xfail-tidy-cr"
18+
tab_flag="xfail-tidy-tab"
19+
linelength_flag="xfail-tidy-linelength"
1720

1821
# Be careful to support Python 2.4, 2.6, and 3.x here!
1922
config_proc=subprocess.Popen([ "git", "config", "core.autocrlf" ],
@@ -46,12 +49,22 @@ def do_license_check(name, contents):
4649

4750
current_name = ""
4851
current_contents = ""
52+
check_tab = True
53+
check_cr = True
54+
check_linelength = True
55+
4956

5057
try:
5158
for line in fileinput.input(file_names,
5259
openhook=fileinput.hook_encoded("utf-8")):
5360

5461
if fileinput.filename().find("tidy.py") == -1:
62+
if line.find(cr_flag) != -1:
63+
check_cr = False
64+
if line.find(tab_flag) != -1:
65+
check_tab = False
66+
if line.find(linelength_flag) != -1:
67+
check_linelength = False
5568
if line.find("// XXX") != -1:
5669
report_err("XXX is no longer necessary, use FIXME")
5770
if line.find("TODO") != -1:
@@ -72,16 +85,16 @@ def do_license_check(name, contents):
7285
if "SNAP" in line:
7386
report_warn("unmatched SNAP line: " + line)
7487

75-
if (line.find('\t') != -1 and
88+
if check_tab and (line.find('\t') != -1 and
7689
fileinput.filename().find("Makefile") == -1):
7790
report_err("tab character")
78-
if not autocrlf and line.find('\r') != -1:
91+
if check_cr and not autocrlf and line.find('\r') != -1:
7992
report_err("CR character")
8093
if line.endswith(" \n") or line.endswith("\t\n"):
8194
report_err("trailing whitespace")
8295
line_len = len(line)-2 if autocrlf else len(line)-1
8396

84-
if line_len > cols:
97+
if check_linelength and line_len > cols:
8598
report_err("line longer than %d chars" % cols)
8699

87100
if fileinput.isfirstline() and current_name != "":
@@ -90,6 +103,9 @@ def do_license_check(name, contents):
90103
if fileinput.isfirstline():
91104
current_name = fileinput.filename()
92105
current_contents = ""
106+
check_cr = True
107+
check_tab = True
108+
check_linelength = True
93109

94110
current_contents += line
95111

branches/try2/src/libstd/ascii.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Operations on ASCII strings and characters
1212
13-
use to_str::{ToStr, IntoStr};
13+
use to_str::{ToStr,IntoStr};
1414
use str;
1515
use str::Str;
1616
use str::StrSlice;

branches/try2/src/libstd/cell.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
//! Types dealing with dynamic mutability
1212
13-
use clone::{Clone, DeepClone};
14-
use cmp::Eq;
15-
use ops::Drop;
16-
use option::{None, Option, Some};
13+
use prelude::*;
1714
use cast;
1815
use kinds::{marker, Pod};
1916

branches/try2/src/libstd/local_data.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ local_data::get(key_vector, |opt| assert_eq!(*opt.unwrap(), ~[4]));
4141
// magic.
4242

4343
use cast;
44-
use option::{None, Option, Some};
45-
use vec::{ImmutableVector, MutableVector, OwnedVector};
46-
use iter::{Iterator};
44+
use prelude::*;
4745
use rt::task::{Task, LocalStorage};
4846
use util::replace;
4947

branches/try2/src/libstd/os.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,20 @@
2828

2929
#[allow(missing_doc)];
3030

31-
#[cfg(target_os = "macos")]
32-
#[cfg(windows)]
33-
use iter::range;
34-
3531
use clone::Clone;
3632
use container::Container;
33+
#[cfg(target_os = "macos")]
34+
use iter::range;
3735
use libc;
3836
use libc::{c_char, c_void, c_int};
39-
use option::{Some, None, Option};
37+
use option::{Some, None};
4038
use os;
41-
use ops::Drop;
42-
use result::{Err, Ok, Result};
39+
use prelude::*;
4340
use ptr;
4441
use str;
45-
use str::{Str, StrSlice};
4642
use fmt;
4743
use unstable::finally::Finally;
4844
use sync::atomics::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
49-
use path::{Path, GenericPath};
50-
use iter::Iterator;
51-
use vec::{Vector, CloneableVector, ImmutableVector, MutableVector, OwnedVector};
52-
use ptr::RawPtr;
53-
54-
#[cfg(unix)]
55-
use c_str::ToCStr;
5645

5746
/// Delegates to the libc close() function, returning the same return value.
5847
pub fn close(fd: int) -> int {
@@ -407,8 +396,6 @@ pub fn self_exe_name() -> Option<Path> {
407396

408397
#[cfg(windows)]
409398
fn load_self() -> Option<~[u8]> {
410-
use str::OwnedStr;
411-
412399
unsafe {
413400
use os::win32::fill_utf16_buf_and_decode;
414401
fill_utf16_buf_and_decode(|buf, sz| {
@@ -980,7 +967,6 @@ impl MemoryMap {
980967
/// `ErrZeroLength`.
981968
pub fn new(min_len: uint, options: &[MapOption]) -> Result<MemoryMap, MapError> {
982969
use libc::off_t;
983-
use cmp::Equiv;
984970

985971
if min_len == 0 {
986972
return Err(ErrZeroLength)

branches/try2/src/libstd/reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Utilities for references
1212
1313
#[cfg(not(test))]
14-
use cmp::{Eq, Ord, Ordering, TotalEq, TotalOrd};
14+
use prelude::*;
1515

1616
// Equality for region pointers
1717
#[cfg(not(test))]

branches/try2/src/libstd/run.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ use io::process;
2020
use io;
2121
use libc::{pid_t, c_int};
2222
use libc;
23-
use option::{None, Option, Some};
24-
use task::spawn;
25-
use path::{Path, GenericPath};
26-
use result::Ok;
27-
use str::Str;
28-
use vec::Vector;
29-
use clone::Clone;
23+
use prelude::*;
3024

3125
/**
3226
* A value representing a child process.

branches/try2/src/libstd/trie.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,12 @@
1010

1111
//! Ordered containers with integer keys, implemented as radix tries (`TrieSet` and `TrieMap` types)
1212
13-
use option::{None, Option, Some};
14-
use container::{Container, Map, Mutable, MutableMap};
15-
use iter::{Extendable, FromIterator, Iterator};
13+
use prelude::*;
1614
use mem;
1715
use uint;
1816
use util::replace;
1917
use unstable::intrinsics::init;
2018
use vec;
21-
use ptr::RawPtr;
22-
use vec::{ImmutableVector, Items, MutableVector, MutItems, OwnedVector};
2319

2420
// FIXME: #5244: need to manually update the TrieNode constructor
2521
static SHIFT: uint = 4;

branches/try2/src/libstd/unit.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
//! Functions for the unit type.
1212
1313
#[cfg(not(test))]
14-
use default::Default;
15-
use cmp::{Eq, Equal, Ord, Ordering, TotalEq, TotalOrd};
14+
use prelude::*;
1615

1716
#[cfg(not(test))]
1817
impl Eq for () {

branches/try2/src/libstd/vec_ng.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@
1111
// Migrate documentation over from `std::vec` when it is removed.
1212
#[doc(hidden)];
1313

14-
use ops::Drop;
15-
use option::{None, Option, Some};
16-
use clone::Clone;
17-
use iter::{DoubleEndedIterator, Iterator};
18-
use num::CheckedMul;
14+
use prelude::*;
1915
use container::Container;
2016
use mem::size_of;
2117
use cast::{forget, transmute};
2218
use rt::global_heap::{malloc_raw, realloc_raw};
23-
use vec::{ImmutableVector, Items, MutableVector};
19+
use vec::Items;
2420
use unstable::raw::Slice;
2521
use ptr::{offset, read_ptr};
2622
use libc::{free, c_void};

branches/try2/src/test/auxiliary/extern_mod_ordering_lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[crate_type="lib"];
212

313
pub mod extern_mod_ordering_lib {

branches/try2/src/test/auxiliary/impl_privacy_xc_1.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[crate_type = "lib"];
212

313
pub struct Fish {

branches/try2/src/test/auxiliary/impl_privacy_xc_2.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[crate_type = "lib"];
212

313
pub struct Fish {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
pub trait Foo {
212
fn bar();
313
}

branches/try2/src/test/auxiliary/kinds_in_metadata.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
/* Any copyright is dedicated to the Public Domain.
212
* http://creativecommons.org/publicdomain/zero/1.0/ */
313

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[crate_type="lib"];
212

313
pub struct Au(int);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[no_std];
212

313
pub fn foo() {}

branches/try2/src/test/auxiliary/packed.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[packed]
212
pub struct S {
313
a: u8,

branches/try2/src/test/auxiliary/private_variant_xc.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
pub enum Foo {
212
Bar,
313
priv Baz,

branches/try2/src/test/auxiliary/static_fn_trait_xc_aux.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
pub mod num {
212
pub trait Num2 {
313
fn from_int2(n: int) -> Self;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
pub static mut a: int = 3;

0 commit comments

Comments
 (0)