Skip to content

Commit d23c86e

Browse files
committed
---
yaml --- r: 108537 b: refs/heads/dist-snap c: 9982de6 h: refs/heads/master i: 108535: bf57ba5 v: v3
1 parent fa01862 commit d23c86e

File tree

24 files changed

+66
-116
lines changed

24 files changed

+66
-116
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 87e3b5fe7fc5e601f502a82b4bd73da5c07c59f2
9+
refs/heads/dist-snap: 9982de6397197a63a093e7b79851d1915ef783d7
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.travis.yml

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

branches/dist-snap/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
;;

branches/dist-snap/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))

branches/dist-snap/src/librustc/metadata/loader.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,8 @@ fn get_metadata_section_imp(os: Os, filename: &Path) -> Option<MetadataBlob> {
407407
debug!("checking {} bytes of metadata-version stamp",
408408
vlen);
409409
let minsz = cmp::min(vlen, csz);
410-
let mut version_ok = false;
411-
vec::raw::buf_as_slice(cvbuf, minsz, |buf0| {
412-
version_ok = (buf0 ==
413-
encoder::metadata_encoding_version);
414-
});
410+
let version_ok = vec::raw::buf_as_slice(cvbuf, minsz,
411+
|buf0| buf0 == encoder::metadata_encoding_version);
415412
if !version_ok { return None; }
416413

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

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ 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)
102-
);
101+
!self.is_moved(base);
103102

104103
if !omit_root {
105104
// L-Deref-Managed-Imm-Compiler-Root

branches/dist-snap/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
}

branches/dist-snap/src/librustc/middle/lint.rs

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

1170-
fn check_unnecessary_parens(cx: &Context, e: &ast::Expr) {
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) {
11711181
let (value, msg) = match e.node {
11721182
ast::ExprIf(cond, _, _) => (cond, "`if` condition"),
11731183
ast::ExprWhile(cond, _) => (cond, "`while` condition"),
11741184
ast::ExprMatch(head, _) => (head, "`match` head expression"),
11751185
ast::ExprRet(Some(value)) => (value, "`return` value"),
1186+
ast::ExprAssign(_, value) => (value, "assigned value"),
1187+
ast::ExprAssignOp(_, _, _, value) => (value, "assigned value"),
11761188
_ => return
11771189
};
1190+
check_unnecessary_parens_core(cx, value, msg);
1191+
}
11781192

1179-
match value.node {
1180-
ast::ExprParen(_) => {
1181-
cx.span_lint(UnnecessaryParens, value.span,
1182-
format!("unnecessary parentheses around {}", msg))
1183-
}
1184-
_ => {}
1185-
}
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);
11861205
}
11871206

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

15351554
check_while_true_expr(self, e);
15361555
check_stability(self, e);
1537-
check_unnecessary_parens(self, e);
1556+
check_unnecessary_parens_expr(self, e);
15381557
check_unused_unsafe(self, e);
15391558
check_unsafe_block(self, e);
15401559
check_unnecessary_allocation(self, e);
@@ -1549,6 +1568,7 @@ impl<'a> Visitor<()> for Context<'a> {
15491568
fn visit_stmt(&mut self, s: &ast::Stmt, _: ()) {
15501569
check_path_statement(self, s);
15511570
check_unused_result(self, s);
1571+
check_unnecessary_parens_stmt(self, s);
15521572

15531573
visit::walk_stmt(self, s, ());
15541574
}

branches/dist-snap/src/librustc/middle/trans/monomorphize.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,8 @@ 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 =
147-
(psubsts.tys.slice(0, idx) +
148-
&[psubsts.self_ty.unwrap()] +
149-
psubsts.tys.tailn(idx));
146+
let substs = psubsts.tys.slice(0, idx) +
147+
&[psubsts.self_ty.unwrap()] + psubsts.tys.tailn(idx);
150148
debug!("static default: changed substitution to {}",
151149
substs.repr(ccx.tcx));
152150

branches/dist-snap/src/librustc/middle/ty.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,8 +2293,8 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
22932293
bounds: BuiltinBounds)
22942294
-> TypeContents {
22952295
// These are the type contents of the (opaque) interior
2296-
let contents = (TC::ReachesMutable.when(mutbl == ast::MutMutable) |
2297-
kind_bounds_to_contents(cx, bounds, []));
2296+
let contents = TC::ReachesMutable.when(mutbl == ast::MutMutable) |
2297+
kind_bounds_to_contents(cx, bounds, []);
22982298

22992299
match store {
23002300
UniqTraitStore => {
@@ -3691,15 +3691,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
36913691
}
36923692
}
36933693
terr_integer_as_char => {
3694-
format!("expected an integral type but found `char`")
3694+
format!("expected an integral type but found char")
36953695
}
36963696
terr_int_mismatch(ref values) => {
3697-
format!("expected `{}` but found `{}`",
3697+
format!("expected {} but found {}",
36983698
values.expected.to_str(),
36993699
values.found.to_str())
37003700
}
37013701
terr_float_mismatch(ref values) => {
3702-
format!("expected `{}` but found `{}`",
3702+
format!("expected {} but found {}",
37033703
values.expected.to_str(),
37043704
values.found.to_str())
37053705
}
@@ -3767,13 +3767,13 @@ pub fn provided_trait_methods(cx: ctxt, id: ast::DefId) -> ~[@Method] {
37673767
}
37683768
_ => {
37693769
cx.sess.bug(format!("provided_trait_methods: \
3770-
`{:?}` is not a trait",
3770+
{:?} is not a trait",
37713771
id))
37723772
}
37733773
}
37743774
}
37753775
_ => {
3776-
cx.sess.bug(format!("provided_trait_methods: `{:?}` is not \
3776+
cx.sess.bug(format!("provided_trait_methods: {:?} is not \
37773777
a trait",
37783778
id))
37793779
}

branches/dist-snap/src/librustc/middle/typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ pub fn instantiate_trait_ref(ccx: &CrateCtxt,
768768
_ => {
769769
ccx.tcx.sess.span_fatal(
770770
ast_trait_ref.path.span,
771-
format!("`{}` is not a trait",
771+
format!("{} is not a trait",
772772
path_to_str(&ast_trait_ref.path)));
773773
}
774774
}

branches/dist-snap/src/librustdoc/html/static/main.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,8 @@
114114
function initSearch(searchIndex) {
115115
var currentResults, index, params = getQueryStringParams();
116116

117-
// Populate search bar with query string search term when provided,
118-
// but only if the input bar is empty. This avoid the obnoxious issue
119-
// where you start trying to do a search, and the index loads, and
120-
// suddenly your search is gone!
121-
if ($(".search-input")[0].value === "") {
122-
$(".search-input")[0].value = params.search || '';
123-
}
117+
// Populate search bar with query string search term when provided.
118+
$(".search-input")[0].value = params.search || '';
124119

125120
/**
126121
* Executes the query and builds an index of results
@@ -579,12 +574,8 @@
579574
// When browsing forward to search results the previous search will be repeated,
580575
// so the currentResults are cleared to ensure the search is successful.
581576
currentResults = null;
582-
// Synchronize search bar with query string state and
583-
// perform the search, but don't empty the bar if there's
584-
// nothing there.
585-
if params.search !== undefined {
586-
$('.search-input').val(params.search);
587-
}
577+
// Synchronize search bar with query string state and perform the search.
578+
$('.search-input').val(params.search);
588579
// Some browsers fire 'onpopstate' for every page load (Chrome), while others fire the
589580
// event only when actually popping a state (Firefox), which is why search() is called
590581
// both here and at the end of the startSearch() function.

branches/dist-snap/src/libserialize/ebml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ pub mod writer {
674674
let last_size_pos = self.size_positions.pop().unwrap();
675675
let cur_pos = try!(self.writer.tell());
676676
try!(self.writer.seek(last_size_pos as i64, io::SeekSet));
677-
let size = (cur_pos as uint - last_size_pos - 4);
677+
let size = cur_pos as uint - last_size_pos - 4;
678678
write_sized_vuint(self.writer, size, 4u);
679679
try!(self.writer.seek(cur_pos as i64, io::SeekSet));
680680

branches/dist-snap/src/libstd/os.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub mod win32 {
119119
} else if k == n &&
120120
libc::GetLastError() ==
121121
libc::ERROR_INSUFFICIENT_BUFFER as DWORD {
122-
n *= (2 as DWORD);
122+
n *= 2 as DWORD;
123123
} else if k >= n {
124124
n = k;
125125
} else {
@@ -225,7 +225,7 @@ pub fn env_as_bytes() -> ~[(~[u8],~[u8])] {
225225
for p in input.iter() {
226226
let vs: ~[&[u8]] = p.splitn(1, |b| *b == '=' as u8).collect();
227227
let key = vs[0].to_owned();
228-
let val = (if vs.len() < 2 { ~[] } else { vs[1].to_owned() });
228+
let val = if vs.len() < 2 { ~[] } else { vs[1].to_owned() };
229229
pairs.push((key, val));
230230
}
231231
pairs

branches/dist-snap/src/libsyntax/abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl AbiSet {
202202
}
203203

204204
pub fn add(&mut self, abi: Abi) {
205-
self.bits |= (1 << abi.index());
205+
self.bits |= 1 << abi.index();
206206
}
207207

208208
pub fn each(&self, op: |abi: Abi| -> bool) -> bool {

branches/dist-snap/src/libsyntax/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,6 @@ mod test {
12241224
},
12251225
};
12261226
// doesn't matter which encoder we use....
1227-
let _f = (&e as &serialize::Encodable<json::Encoder>);
1227+
let _f = &e as &serialize::Encodable<json::Encoder>;
12281228
}
12291229
}

branches/dist-snap/src/libsyntax/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ fn highlight_lines(cm: &codemap::CodeMap,
329329
for _ in range(0, skip) { s.push_char(' '); }
330330
let orig = fm.get_line(lines.lines[0] as int);
331331
for pos in range(0u, left-skip) {
332-
let curChar = (orig[pos] as char);
332+
let curChar = orig[pos] as char;
333333
// Whenever a tab occurs on the previous line, we insert one on
334334
// the error-point-squiggly-line as well (instead of a space).
335335
// That way the squiggly line will usually appear in the correct

branches/dist-snap/src/libterm/terminfo/parm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
259259
' ' => flags.space = true,
260260
'.' => fstate = FormatStatePrecision,
261261
'0'..'9' => {
262-
flags.width = (cur as uint - '0' as uint);
262+
flags.width = cur as uint - '0' as uint;
263263
fstate = FormatStateWidth;
264264
}
265265
_ => unreachable!()
@@ -359,7 +359,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
359359
flags.space = true;
360360
}
361361
(FormatStateFlags,'0'..'9') => {
362-
flags.width = (cur as uint - '0' as uint);
362+
flags.width = cur as uint - '0' as uint;
363363
*fstate = FormatStateWidth;
364364
}
365365
(FormatStateFlags,'.') => {

branches/dist-snap/src/libtest/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ impl MetricMap {
10471047
let r = match selfmap.find(k) {
10481048
None => MetricRemoved,
10491049
Some(v) => {
1050-
let delta = (v.value - vold.value);
1050+
let delta = v.value - vold.value;
10511051
let noise = match noise_pct {
10521052
None => f64::max(vold.noise.abs(), v.noise.abs()),
10531053
Some(pct) => vold.value * pct / 100.0

branches/dist-snap/src/libuuid/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ impl Uuid {
296296
///
297297
/// This represents the algorithm used to generate the contents
298298
pub fn get_version(&self) -> Option<UuidVersion> {
299-
let v = (self.bytes[6] >> 4);
299+
let v = self.bytes[6] >> 4;
300300
match v {
301301
1 => Some(Version1Mac),
302302
2 => Some(Version2Dce),

branches/dist-snap/src/test/compile-fail/gated-phase.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
// aux-build:macro_crate_test.rs
12-
// ignore-stage1
1312

1413
#[phase(syntax)]
1514
//~^ ERROR compile time crate loading is experimental and possibly buggy

0 commit comments

Comments
 (0)