Skip to content

Commit b2bad98

Browse files
AatchJames Miller
authored andcommitted
---
yaml --- r: 63357 b: refs/heads/snap-stage3 c: cc908b7 h: refs/heads/master i: 63355: 932c4e8 v: v3
1 parent 0d79c7b commit b2bad98

30 files changed

+901
-784
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 9c4f9bb71bbac102621fb53efa8d41351a92350e
4+
refs/heads/snap-stage3: cc908b772cc15a2c03167b33b373a418283c1618
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/terminfo/parm.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
224224
}
225225
} else { return Err(~"stack is empty") },
226226
'i' => match (copy mparams[0], copy mparams[1]) {
227-
(Number(x), Number(y)) => {
228-
mparams[0] = Number(x+1);
229-
mparams[1] = Number(y+1);
227+
(Number(ref mut x), Number(ref mut y)) => {
228+
*x += 1;
229+
*y += 1;
230230
},
231231
(_, _) => return Err(~"first two params not numbers with %i")
232232
},
@@ -352,7 +352,6 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
352352
#[cfg(test)]
353353
mod test {
354354
use super::*;
355-
use core::result::Ok;
356355

357356
#[test]
358357
fn test_basic_setabf() {
@@ -367,16 +366,6 @@ mod test {
367366
bytes!("21").to_owned());
368367
}
369368

370-
#[test]
371-
fn test_op_i() {
372-
let mut vars = Variables::new();
373-
assert_eq!(expand(bytes!("%p1%d%p2%d%p3%d%i%p1%d%p2%d%p3%d"),
374-
[Number(1),Number(2),Number(3)], &mut vars),
375-
Ok(bytes!("123233").to_owned()));
376-
assert_eq!(expand(bytes!("%p1%d%p2%d%i%p1%d%p2%d"), [], &mut vars),
377-
Ok(bytes!("0011").to_owned()));
378-
}
379-
380369
#[test]
381370
fn test_param_stack_failure_conditions() {
382371
let mut varstruct = Variables::new();

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use lib::llvm::ModuleRef;
1818
use lib;
1919
use metadata::common::LinkMeta;
2020
use metadata::{encoder, csearch, cstore};
21-
use middle::trans::common::CrateContext;
21+
use middle::trans::context::CrateContext;
2222
use middle::ty;
2323
use util::ppaux;
2424

@@ -622,11 +622,11 @@ pub fn symbol_hash(tcx: ty::ctxt,
622622
hash.to_managed()
623623
}
624624

625-
pub fn get_symbol_hash(ccx: @CrateContext, t: ty::t) -> @str {
625+
pub fn get_symbol_hash(ccx: &mut CrateContext, t: ty::t) -> @str {
626626
match ccx.type_hashcodes.find(&t) {
627627
Some(&h) => h,
628628
None => {
629-
let hash = symbol_hash(ccx.tcx, ccx.symbol_hasher, t, ccx.link_meta);
629+
let hash = symbol_hash(ccx.tcx, &mut ccx.symbol_hasher, t, ccx.link_meta);
630630
ccx.type_hashcodes.insert(t, hash);
631631
hash
632632
}
@@ -705,7 +705,7 @@ pub fn exported_name(sess: Session,
705705
path_name(sess.ident_of(vers))));
706706
}
707707

708-
pub fn mangle_exported_name(ccx: @CrateContext,
708+
pub fn mangle_exported_name(ccx: &mut CrateContext,
709709
path: path,
710710
t: ty::t) -> ~str {
711711
let hash = get_symbol_hash(ccx, t);
@@ -714,7 +714,7 @@ pub fn mangle_exported_name(ccx: @CrateContext,
714714
ccx.link_meta.vers);
715715
}
716716

717-
pub fn mangle_internal_name_by_type_only(ccx: @CrateContext,
717+
pub fn mangle_internal_name_by_type_only(ccx: &mut CrateContext,
718718
t: ty::t,
719719
name: &str) -> ~str {
720720
let s = ppaux::ty_to_short_str(ccx.tcx, t);
@@ -725,7 +725,7 @@ pub fn mangle_internal_name_by_type_only(ccx: @CrateContext,
725725
path_name(ccx.sess.ident_of(hash))]);
726726
}
727727

728-
pub fn mangle_internal_name_by_type_and_seq(ccx: @CrateContext,
728+
pub fn mangle_internal_name_by_type_and_seq(ccx: &mut CrateContext,
729729
t: ty::t,
730730
name: &str) -> ~str {
731731
let s = ppaux::ty_to_str(ccx.tcx, t);
@@ -736,18 +736,18 @@ pub fn mangle_internal_name_by_type_and_seq(ccx: @CrateContext,
736736
path_name((ccx.names)(name))]);
737737
}
738738

739-
pub fn mangle_internal_name_by_path_and_seq(ccx: @CrateContext,
739+
pub fn mangle_internal_name_by_path_and_seq(ccx: &mut CrateContext,
740740
path: path,
741741
flav: &str) -> ~str {
742742
return mangle(ccx.sess,
743743
vec::append_one(path, path_name((ccx.names)(flav))));
744744
}
745745

746-
pub fn mangle_internal_name_by_path(ccx: @CrateContext, path: path) -> ~str {
746+
pub fn mangle_internal_name_by_path(ccx: &mut CrateContext, path: path) -> ~str {
747747
return mangle(ccx.sess, path);
748748
}
749749

750-
pub fn mangle_internal_name_by_seq(ccx: @CrateContext, flav: &str) -> ~str {
750+
pub fn mangle_internal_name_by_seq(ccx: &mut CrateContext, flav: &str) -> ~str {
751751
return fmt!("%s_%u", flav, (ccx.names)(flav).name);
752752
}
753753

0 commit comments

Comments
 (0)