Skip to content

Commit b1ad1bf

Browse files
committed
---
yaml --- r: 233878 b: refs/heads/beta c: bb6be30 h: refs/heads/master v: v3
1 parent 91f43dd commit b1ad1bf

File tree

6 files changed

+10
-107
lines changed

6 files changed

+10
-107
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 4da6c7e15c2d4c49ae1a48e9bac7dde39f5488df
26+
refs/heads/beta: bb6be30d6f7bf502e5e6fa28f460902ea03cd75b
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/libcollections/btree/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ mod node;
1212
pub mod map;
1313
pub mod set;
1414

15-
#[doc(hidden)]
1615
trait Recover<Q: ?Sized> {
1716
type Key;
1817

branches/beta/src/librustc_trans/trans/consts.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -501,14 +501,9 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
501501
debug!("const_expr_unadjusted: te1={}, ty={:?}",
502502
cx.tn().val_to_string(te1),
503503
ty);
504-
let is_simd = ty.is_simd();
505-
let intype = if is_simd {
506-
ty.simd_type(cx.tcx())
507-
} else {
508-
ty
509-
};
510-
let is_float = intype.is_fp();
511-
let signed = intype.is_signed();
504+
assert!(!ty.is_simd());
505+
let is_float = ty.is_fp();
506+
let signed = ty.is_signed();
512507

513508
let (te2, _) = const_expr(cx, &**e2, param_substs, fn_args);
514509

@@ -552,14 +547,7 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
552547
ConstFCmp(cmp, te1, te2)
553548
} else {
554549
let cmp = base::bin_op_to_icmp_predicate(cx, b.node, signed);
555-
let bool_val = ConstICmp(cmp, te1, te2);
556-
if is_simd {
557-
// LLVM outputs an `< size x i1 >`, so we need to perform
558-
// a sign extension to get the correctly sized type.
559-
llvm::LLVMConstIntCast(bool_val, val_ty(te1).to_ref(), True)
560-
} else {
561-
bool_val
562-
}
550+
ConstICmp(cmp, te1, te2)
563551
}
564552
},
565553
} } // unsafe { match b.node {

branches/beta/src/librustc_trans/trans/expr.rs

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,14 +1693,9 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
16931693
let _icx = push_ctxt("trans_eager_binop");
16941694

16951695
let tcx = bcx.tcx();
1696-
let is_simd = lhs_t.is_simd();
1697-
let intype = if is_simd {
1698-
lhs_t.simd_type(tcx)
1699-
} else {
1700-
lhs_t
1701-
};
1702-
let is_float = intype.is_fp();
1703-
let is_signed = intype.is_signed();
1696+
assert!(!lhs_t.is_simd());
1697+
let is_float = lhs_t.is_fp();
1698+
let is_signed = lhs_t.is_signed();
17041699
let info = expr_info(binop_expr);
17051700

17061701
let binop_debug_loc = binop_expr.debug_loc();
@@ -1710,8 +1705,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
17101705
ast::BiAdd => {
17111706
if is_float {
17121707
FAdd(bcx, lhs, rhs, binop_debug_loc)
1713-
} else if is_simd {
1714-
Add(bcx, lhs, rhs, binop_debug_loc)
17151708
} else {
17161709
let (newbcx, res) = with_overflow_check(
17171710
bcx, OverflowOp::Add, info, lhs_t, lhs, rhs, binop_debug_loc);
@@ -1722,8 +1715,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
17221715
ast::BiSub => {
17231716
if is_float {
17241717
FSub(bcx, lhs, rhs, binop_debug_loc)
1725-
} else if is_simd {
1726-
Sub(bcx, lhs, rhs, binop_debug_loc)
17271718
} else {
17281719
let (newbcx, res) = with_overflow_check(
17291720
bcx, OverflowOp::Sub, info, lhs_t, lhs, rhs, binop_debug_loc);
@@ -1734,8 +1725,6 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
17341725
ast::BiMul => {
17351726
if is_float {
17361727
FMul(bcx, lhs, rhs, binop_debug_loc)
1737-
} else if is_simd {
1738-
Mul(bcx, lhs, rhs, binop_debug_loc)
17391728
} else {
17401729
let (newbcx, res) = with_overflow_check(
17411730
bcx, OverflowOp::Mul, info, lhs_t, lhs, rhs, binop_debug_loc);
@@ -1828,11 +1817,7 @@ fn trans_eager_binop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
18281817
res
18291818
}
18301819
ast::BiEq | ast::BiNe | ast::BiLt | ast::BiGe | ast::BiLe | ast::BiGt => {
1831-
if is_simd {
1832-
base::compare_simd_types(bcx, lhs, rhs, intype, val_ty(lhs), op.node, binop_debug_loc)
1833-
} else {
1834-
base::compare_scalar_types(bcx, lhs, rhs, intype, op.node, binop_debug_loc)
1835-
}
1820+
base::compare_scalar_types(bcx, lhs, rhs, lhs_t, op.node, binop_debug_loc)
18361821
}
18371822
_ => {
18381823
bcx.tcx().sess.span_bug(binop_expr.span, "unexpected binop");
@@ -2533,14 +2518,7 @@ fn build_unchecked_rshift<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
25332518
let rhs = base::cast_shift_expr_rhs(bcx, ast::BinOp_::BiShr, lhs, rhs);
25342519
// #1877, #10183: Ensure that input is always valid
25352520
let rhs = shift_mask_rhs(bcx, rhs, binop_debug_loc);
2536-
let tcx = bcx.tcx();
2537-
let is_simd = lhs_t.is_simd();
2538-
let intype = if is_simd {
2539-
lhs_t.simd_type(tcx)
2540-
} else {
2541-
lhs_t
2542-
};
2543-
let is_signed = intype.is_signed();
2521+
let is_signed = lhs_t.is_signed();
25442522
if is_signed {
25452523
AShr(bcx, lhs, rhs, binop_debug_loc)
25462524
} else {

branches/beta/src/libstd/collections/hash/map.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,14 +1583,6 @@ impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
15831583
}
15841584
}
15851585

1586-
#[stable(feature = "hash_extend_copy", since = "1.4.0")]
1587-
impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap<K, V, S>
1588-
where K: Eq + Hash + Copy, V: Copy, S: HashState
1589-
{
1590-
fn extend<T: IntoIterator<Item=(&'a K, &'a V)>>(&mut self, iter: T) {
1591-
self.extend(iter.into_iter().map(|(&key, &value)| (key, value)));
1592-
}
1593-
}
15941586

15951587
/// `RandomState` is the default state for `HashMap` types.
15961588
///
@@ -2355,20 +2347,4 @@ mod test_map {
23552347
check(&m);
23562348
}
23572349
}
2358-
2359-
#[test]
2360-
fn test_extend_ref() {
2361-
let mut a = HashMap::new();
2362-
a.insert(1, "one");
2363-
let mut b = HashMap::new();
2364-
b.insert(2, "two");
2365-
b.insert(3, "three");
2366-
2367-
a.extend(&b);
2368-
2369-
assert_eq!(a.len(), 3);
2370-
assert_eq!(a[&1], "one");
2371-
assert_eq!(a[&2], "two");
2372-
assert_eq!(a[&3], "three");
2373-
}
23742350
}

branches/beta/src/libstd/collections/hash/set.rs

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -654,16 +654,6 @@ impl<T, S> Extend<T> for HashSet<T, S>
654654
}
655655
}
656656

657-
#[stable(feature = "hash_extend_copy", since = "1.4.0")]
658-
impl<'a, T, S> Extend<&'a T> for HashSet<T, S>
659-
where T: 'a + Eq + Hash + Copy,
660-
S: HashState,
661-
{
662-
fn extend<I: IntoIterator<Item=&'a T>>(&mut self, iter: I) {
663-
self.extend(iter.into_iter().cloned());
664-
}
665-
}
666-
667657
#[stable(feature = "rust1", since = "1.0.0")]
668658
impl<T, S> Default for HashSet<T, S>
669659
where T: Eq + Hash,
@@ -1335,32 +1325,4 @@ mod test_set {
13351325
assert_eq!(it.next(), Some(&Foo("a", 2)));
13361326
assert_eq!(it.next(), None);
13371327
}
1338-
1339-
#[test]
1340-
fn test_extend_ref() {
1341-
let mut a = HashSet::new();
1342-
a.insert(1);
1343-
1344-
a.extend(&[2, 3, 4]);
1345-
1346-
assert_eq!(a.len(), 4);
1347-
assert!(a.contains(&1));
1348-
assert!(a.contains(&2));
1349-
assert!(a.contains(&3));
1350-
assert!(a.contains(&4));
1351-
1352-
let mut b = HashSet::new();
1353-
b.insert(5);
1354-
b.insert(6);
1355-
1356-
a.extend(&b);
1357-
1358-
assert_eq!(a.len(), 6);
1359-
assert!(a.contains(&1));
1360-
assert!(a.contains(&2));
1361-
assert!(a.contains(&3));
1362-
assert!(a.contains(&4));
1363-
assert!(a.contains(&5));
1364-
assert!(a.contains(&6));
1365-
}
13661328
}

0 commit comments

Comments
 (0)