Skip to content

Commit 394c4fd

Browse files
committed
---
yaml --- r: 191134 b: refs/heads/auto c: bc1dde4 h: refs/heads/master v: v3
1 parent 99f4f61 commit 394c4fd

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 809a554fca2d0ebc2ba50077016fe282a4064752
13+
refs/heads/auto: bc1dde468c1613743c919cb9f33923cc9916c5b4
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcollections/bit.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ pub struct BitVec {
169169
impl Index<usize> for BitVec {
170170
type Output = bool;
171171

172+
173+
#[cfg(stage0)]
172174
#[inline]
173175
fn index(&self, i: &usize) -> &bool {
174176
if self.get(*i).expect("index out of bounds") {
@@ -177,6 +179,16 @@ impl Index<usize> for BitVec {
177179
&FALSE
178180
}
179181
}
182+
183+
#[cfg(not(stage0))]
184+
#[inline]
185+
fn index(&self, i: usize) -> &bool {
186+
if self.get(i).expect("index out of bounds") {
187+
&TRUE
188+
} else {
189+
&FALSE
190+
}
191+
}
180192
}
181193

182194
/// Computes how many blocks are needed to store that many bits

branches/auto/src/libcore/ops.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,14 @@ pub trait Index<Idx: ?Sized> {
917917
type Output: ?Sized;
918918

919919
/// The method for the indexing (`Foo[Bar]`) operation
920+
#[cfg(stage0)]
920921
#[stable(feature = "rust1", since = "1.0.0")]
921922
fn index<'a>(&'a self, index: &Idx) -> &'a Self::Output;
923+
924+
/// The method for the indexing (`Foo[Bar]`) operation
925+
#[cfg(not(stage0))]
926+
#[stable(feature = "rust1", since = "1.0.0")]
927+
fn index<'a>(&'a self, index: Idx) -> &'a Self::Output;
922928
}
923929

924930
/// The `IndexMut` trait is used to specify the functionality of indexing
@@ -960,8 +966,14 @@ pub trait Index<Idx: ?Sized> {
960966
#[stable(feature = "rust1", since = "1.0.0")]
961967
pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
962968
/// The method for the indexing (`Foo[Bar]`) operation
969+
#[cfg(stage0)]
963970
#[stable(feature = "rust1", since = "1.0.0")]
964971
fn index_mut<'a>(&'a mut self, index: &Idx) -> &'a mut Self::Output;
972+
973+
/// The method for the indexing (`Foo[Bar]`) operation
974+
#[cfg(not(stage0))]
975+
#[stable(feature = "rust1", since = "1.0.0")]
976+
fn index_mut<'a>(&'a mut self, index: Idx) -> &'a mut Self::Output;
965977
}
966978

967979
/// An unbounded range.

branches/auto/src/librustc/middle/expr_use_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,'tcx,TYPER> {
442442
if !self.walk_overloaded_operator(expr,
443443
&**lhs,
444444
vec![&**rhs],
445-
PassArgs::ByRef) {
445+
PassArgs::ByValue) {
446446
self.select_from_expr(&**lhs);
447447
self.consume_expr(&**rhs);
448448
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ fn trans_index<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
843843
base_datum,
844844
vec![(ix_datum, idx.id)],
845845
Some(SaveIn(scratch.val)),
846-
true));
846+
false));
847847
let datum = scratch.to_expr_datum();
848848
if type_is_sized(bcx.tcx(), elt_ty) {
849849
Datum::new(datum.to_llscalarish(bcx), elt_ty, LvalueExpr)

0 commit comments

Comments
 (0)