Skip to content

Commit 89fa13c

Browse files
committed
---
yaml --- r: 102074 b: refs/heads/master c: 8b81510 h: refs/heads/master v: v3
1 parent fa60b45 commit 89fa13c

Some content is hidden

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

52 files changed

+112
-292
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2ba0a8a096c1e39ea558659b56280a49852c7925
2+
refs/heads/master: 8b815104814f814f5fb7d80ba87b63d49ca84e9c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/.travis.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

trunk/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Adrien Tétar <[email protected]>
77
Alan Andrade <[email protected]>
88
Aleksander Balicki <[email protected]>
99
Alex Crichton <[email protected]>
10-
Alex Lyon <[email protected]>
1110
Alex Rønne Petersen <[email protected]>
1211
Alexander Stavonin <[email protected]>
1312
Alexandros Tasos <[email protected]>

trunk/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ then
604604
LLVM_VERSION=$($LLVM_CONFIG --version)
605605

606606
case $LLVM_VERSION in
607-
(3.[2-5]svn|3.[2-5])
607+
(3.[2-4]svn|3.[2-4])
608608
msg "found ok version of LLVM: $LLVM_VERSION"
609609
;;
610610
(*)
@@ -626,7 +626,7 @@ then
626626
| cut -d ' ' -f 2)
627627

628628
case $CFG_CLANG_VERSION in
629-
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* )
629+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* )
630630
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
631631
CFG_C_COMPILER="clang"
632632
;;

trunk/mk/crates.mk

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@
5050
################################################################################
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test time
53+
uuid serialize sync getopts collections num test
5454
HOST_CRATES := syntax rustc rustdoc fourcc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

5858
DEPS_std := native:rustrt native:compiler-rt
59-
DEPS_extra := std term sync serialize getopts collections time
59+
DEPS_extra := std term sync serialize getopts collections
6060
DEPS_green := std native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std term serialize collections
6464
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
65-
collections time extra
65+
collections extra
6666
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
67-
test time
67+
test
6868
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
7070
DEPS_glob := std
@@ -78,7 +78,6 @@ DEPS_collections := std serialize
7878
DEPS_fourcc := syntax std
7979
DEPS_num := std extra
8080
DEPS_test := std extra collections getopts serialize term
81-
DEPS_time := std serialize
8281

8382
TOOL_DEPS_compiletest := test green rustuv getopts
8483
TOOL_DEPS_rustdoc := rustdoc green rustuv

trunk/mk/main.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,8 @@ LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt llvm-extract
218218
define DEF_LLVM_VARS
219219
# The configure script defines these variables with the target triples
220220
# separated by Z. This defines new ones with the expected format.
221-
ifeq ($$(CFG_LLVM_ROOT),)
222221
CFG_LLVM_BUILD_DIR_$(1):=$$(CFG_LLVM_BUILD_DIR_$(subst -,_,$(1)))
223222
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_INST_DIR_$(subst -,_,$(1)))
224-
else
225-
CFG_LLVM_INST_DIR_$(1):=$$(CFG_LLVM_ROOT)
226-
endif
227223

228224
# Any rules that depend on LLVM should depend on LLVM_CONFIG
229225
LLVM_CONFIG_$(1):=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-config$$(X_$(1))

trunk/src/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,14 +875,14 @@ An example of what will and will not work for `use` items:
875875

876876
~~~~
877877
# #[allow(unused_imports)];
878-
use foo::extra::json; // good: foo is at the root of the crate
878+
use foo::extra; // good: foo is at the root of the crate
879879
use foo::baz::foobaz; // good: foo is at the root of the crate
880880
881881
mod foo {
882882
extern crate extra;
883883
884-
use foo::extra::json; // good: foo is at crate root
885-
// use extra::json::*; // bad: extra is not at the crate root
884+
use foo::extra::time; // good: foo is at crate root
885+
// use extra::*; // bad: extra is not at the crate root
886886
use self::baz::foobaz; // good: self refers to module 'foo'
887887
use foo::bar::foobar; // good: foo is at crate root
888888

trunk/src/libextra/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Rust extras are part of the standard Rust distribution.
3737
extern crate sync;
3838
extern crate serialize;
3939
extern crate collections;
40-
extern crate time;
4140

4241
// Utility modules
4342
pub mod c_vec;
4443
pub mod url;
4544
pub mod json;
4645
pub mod tempfile;
46+
pub mod time;
4747
pub mod workcache;
4848
pub mod stats;
4949

trunk/src/libtime/lib.rs renamed to trunk/src/libextra/time.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[crate_id = "time#0.10-pre"];
12-
#[crate_type = "rlib"];
13-
#[crate_type = "dylib"];
14-
#[license = "MIT/ASL2"];
15-
1611
#[allow(missing_doc)];
1712

18-
extern crate serialize;
19-
2013
use std::io::BufReader;
2114
use std::libc;
2215
use std::num;
@@ -1042,8 +1035,7 @@ pub fn strftime(format: &str, tm: &Tm) -> ~str {
10421035
10431036
#[cfg(test)]
10441037
mod tests {
1045-
use super::{Timespec, get_time, precise_time_ns, precise_time_s, tzset,
1046-
at_utc, at, strptime};
1038+
use super::*;
10471039
10481040
use std::f64;
10491041
use std::result::{Err, Ok};

trunk/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ extern crate serialize;
3939
extern crate sync;
4040
extern crate getopts;
4141
extern crate collections;
42-
extern crate time;
4342

4443
use back::link;
4544
use driver::session;

trunk/src/librustc/metadata/loader.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ use std::io;
3232
use std::os::consts::{macos, freebsd, linux, android, win32};
3333
use std::str;
3434
use std::vec;
35-
3635
use flate;
37-
use time;
3836

3937
pub enum Os {
4038
OsMacos,
@@ -363,6 +361,7 @@ impl ArchiveMetadata {
363361

364362
// Just a small wrapper to time how long reading metadata takes.
365363
fn get_metadata_section(os: Os, filename: &Path) -> Option<MetadataBlob> {
364+
use extra::time;
366365
let start = time::precise_time_ns();
367366
let ret = get_metadata_section_imp(os, filename);
368367
info!("reading {} => {}ms", filename.filename_display(),
@@ -407,8 +406,11 @@ fn get_metadata_section_imp(os: Os, filename: &Path) -> Option<MetadataBlob> {
407406
debug!("checking {} bytes of metadata-version stamp",
408407
vlen);
409408
let minsz = cmp::min(vlen, csz);
410-
let version_ok = vec::raw::buf_as_slice(cvbuf, minsz,
411-
|buf0| buf0 == encoder::metadata_encoding_version);
409+
let mut version_ok = false;
410+
vec::raw::buf_as_slice(cvbuf, minsz, |buf0| {
411+
version_ok = (buf0 ==
412+
encoder::metadata_encoding_version);
413+
});
412414
if !version_ok { return None; }
413415

414416
let cvbuf1 = cvbuf.offset(vlen as int);

trunk/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ impl<'a> GuaranteeLifetimeContext<'a> {
9595
let base_scope = self.scope(base);
9696

9797
// L-Deref-Managed-Imm-User-Root
98-
let omit_root =
98+
let omit_root = (
9999
self.bccx.is_subregion_of(self.loan_region, base_scope) &&
100100
self.is_rvalue_or_immutable(base) &&
101-
!self.is_moved(base);
101+
!self.is_moved(base)
102+
);
102103

103104
if !omit_root {
104105
// L-Deref-Managed-Imm-Compiler-Root

trunk/src/librustc/middle/dataflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ fn bitwise(out_vec: &mut [uint], in_vec: &[uint], op: |uint, uint| -> uint)
891891
let old_val = *out_elt;
892892
let new_val = op(old_val, *in_elt);
893893
*out_elt = new_val;
894-
changed |= old_val != new_val;
894+
changed |= (old_val != new_val);
895895
}
896896
changed
897897
}

trunk/src/librustc/middle/lint.rs

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,41 +1167,22 @@ fn check_pat_non_uppercase_statics(cx: &Context, p: &ast::Pat) {
11671167
}
11681168
}
11691169

1170-
fn check_unnecessary_parens_core(cx: &Context, value: &ast::Expr, msg: &str) {
1171-
match value.node {
1172-
ast::ExprParen(_) => {
1173-
cx.span_lint(UnnecessaryParens, value.span,
1174-
format!("unnecessary parentheses around {}", msg))
1175-
}
1176-
_ => {}
1177-
}
1178-
}
1179-
1180-
fn check_unnecessary_parens_expr(cx: &Context, e: &ast::Expr) {
1170+
fn check_unnecessary_parens(cx: &Context, e: &ast::Expr) {
11811171
let (value, msg) = match e.node {
11821172
ast::ExprIf(cond, _, _) => (cond, "`if` condition"),
11831173
ast::ExprWhile(cond, _) => (cond, "`while` condition"),
11841174
ast::ExprMatch(head, _) => (head, "`match` head expression"),
11851175
ast::ExprRet(Some(value)) => (value, "`return` value"),
1186-
ast::ExprAssign(_, value) => (value, "assigned value"),
1187-
ast::ExprAssignOp(_, _, _, value) => (value, "assigned value"),
11881176
_ => return
11891177
};
1190-
check_unnecessary_parens_core(cx, value, msg);
1191-
}
11921178

1193-
fn check_unnecessary_parens_stmt(cx: &Context, s: &ast::Stmt) {
1194-
let (value, msg) = match s.node {
1195-
ast::StmtDecl(decl, _) => match decl.node {
1196-
ast::DeclLocal(local) => match local.init {
1197-
Some(value) => (value, "assigned value"),
1198-
None => return
1199-
},
1200-
_ => return
1201-
},
1202-
_ => return
1203-
};
1204-
check_unnecessary_parens_core(cx, value, msg);
1179+
match value.node {
1180+
ast::ExprParen(_) => {
1181+
cx.span_lint(UnnecessaryParens, value.span,
1182+
format!("unnecessary parentheses around {}", msg))
1183+
}
1184+
_ => {}
1185+
}
12051186
}
12061187

12071188
fn check_unused_unsafe(cx: &Context, e: &ast::Expr) {
@@ -1553,7 +1534,7 @@ impl<'a> Visitor<()> for Context<'a> {
15531534

15541535
check_while_true_expr(self, e);
15551536
check_stability(self, e);
1556-
check_unnecessary_parens_expr(self, e);
1537+
check_unnecessary_parens(self, e);
15571538
check_unused_unsafe(self, e);
15581539
check_unsafe_block(self, e);
15591540
check_unnecessary_allocation(self, e);
@@ -1568,7 +1549,6 @@ impl<'a> Visitor<()> for Context<'a> {
15681549
fn visit_stmt(&mut self, s: &ast::Stmt, _: ()) {
15691550
check_path_statement(self, s);
15701551
check_unused_result(self, s);
1571-
check_unnecessary_parens_stmt(self, s);
15721552

15731553
visit::walk_stmt(self, s, ());
15741554
}

trunk/src/librustc/middle/reachable.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -404,23 +404,11 @@ pub fn find_reachable(tcx: ty::ctxt,
404404
let reachable_context = ReachableContext::new(tcx, method_map);
405405

406406
// Step 1: Seed the worklist with all nodes which were found to be public as
407-
// a result of the privacy pass along with all local lang items. If
408-
// other crates link to us, they're going to expect to be able to
409-
// use the lang items, so we need to be sure to mark them as
410-
// exported.
411-
let mut worklist = reachable_context.worklist.borrow_mut();
407+
// a result of the privacy pass
412408
for &id in exported_items.iter() {
409+
let mut worklist = reachable_context.worklist.borrow_mut();
413410
worklist.get().push(id);
414411
}
415-
for (_, item) in tcx.lang_items.items() {
416-
match *item {
417-
Some(did) if is_local(did) => {
418-
worklist.get().push(did.node);
419-
}
420-
_ => {}
421-
}
422-
}
423-
drop(worklist);
424412

425413
// Step 2: Mark all symbols that the symbols on the worklist touch.
426414
reachable_context.propagate();

trunk/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ use util::ppaux::{Repr, ty_to_str};
7272
use util::sha2::Sha256;
7373

7474
use arena::TypedArena;
75+
use extra::time;
7576
use std::c_str::ToCStr;
7677
use std::cell::{Cell, RefCell};
7778
use std::hashmap::HashMap;
@@ -89,8 +90,6 @@ use syntax::visit::Visitor;
8990
use syntax::visit;
9091
use syntax::{ast, ast_util, ast_map};
9192

92-
use time;
93-
9493
pub use middle::trans::context::task_llcx;
9594

9695
local_data_key!(task_local_insn_key: ~[&'static str])

trunk/src/librustc/middle/trans/monomorphize.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ pub fn monomorphic_fn(ccx: @CrateContext,
143143
// This is a bit unfortunate.
144144

145145
let idx = psubsts.tys.len() - num_method_ty_params;
146-
let substs = psubsts.tys.slice(0, idx) +
147-
&[psubsts.self_ty.unwrap()] + psubsts.tys.tailn(idx);
146+
let substs =
147+
(psubsts.tys.slice(0, idx) +
148+
&[psubsts.self_ty.unwrap()] +
149+
psubsts.tys.tailn(idx));
148150
debug!("static default: changed substitution to {}",
149151
substs.repr(ccx.tcx));
150152

0 commit comments

Comments
 (0)