Skip to content

Commit 0c3290a

Browse files
committed
Merge
1 parent 6282e5d commit 0c3290a

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

src/librustc/metadata/cstore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub fn find_extern_mod_stmt_cnum(cstore: @mut CStore,
146146
// returns hashes of crates directly used by this crate. Hashes are
147147
// sorted by crate name.
148148
pub fn get_dep_hashes(cstore: @mut CStore) -> ~[~str] {
149-
struct crate_hash { name: ~str, hash: ~str }
149+
struct crate_hash { name: @~str, hash: @~str }
150150
let mut result = ~[];
151151

152152
let extern_mod_crate_map = cstore.extern_mod_crate_map;
@@ -155,7 +155,7 @@ pub fn get_dep_hashes(cstore: @mut CStore) -> ~[~str] {
155155
let hash = decoder::get_crate_hash(cdata.data);
156156
debug!("Add hash[%s]: %s", *cdata.name, *hash);
157157
result.push(crate_hash {
158-
name: /*bad*/copy cdata.name,
158+
name: cdata.name,
159159
hash: hash
160160
});
161161
}

src/librustc/metadata/loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ fn find_library_crate_aux(cx: Context,
8989
filesearch: filesearch::FileSearch) ->
9090
Option<(~str, @~[u8])> {
9191
let crate_name = crate_name_from_metas(/*bad*/copy cx.metas);
92-
let prefix: ~str = prefix + crate_name + ~"-";
93-
let suffix: ~str = /*bad*/copy nn.suffix;
92+
let prefix: ~str = prefix + *crate_name + ~"-";
93+
let suffix: ~str = /*bad*/copy suffix;
9494
9595
let mut matches = ~[];
9696
filesearch::search(filesearch, |path| {

src/librustc/middle/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct LintSpec {
113113
default: level
114114
}
115115

116-
pub type LintDict = HashMap<~str, @LintSpec>;
116+
pub type LintDict = HashMap<@~str, @LintSpec>;
117117

118118
/*
119119
Pass names should not contain a '-', as the compiler normalizes

src/librustc/middle/trans/base.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,21 +1047,19 @@ pub fn load_if_immediate(cx: block, v: ValueRef, t: ty::t) -> ValueRef {
10471047
return v;
10481048
}
10491049

1050-
pub fn trans_trace(bcx: block, sp_opt: Option<span>, trace_str: ~str) {
1050+
pub fn trans_trace(bcx: block, sp_opt: Option<span>, trace_str: @~str) {
10511051
if !bcx.sess().trace() { return; }
10521052
let _icx = bcx.insn_ctxt("trans_trace");
1053-
add_comment(bcx, trace_str);
1053+
add_comment(bcx, *trace_str);
10541054
let V_trace_str = C_cstr(bcx.ccx(), trace_str);
10551055
let (V_filename, V_line) = match sp_opt {
10561056
Some(sp) => {
10571057
let sess = bcx.sess();
10581058
let loc = sess.parse_sess.cm.lookup_char_pos(sp.lo);
1059-
(C_cstr(bcx.ccx(), @/*bad*/copy loc.file.name),
1060-
V_line: loc.line as int)
1059+
(C_cstr(bcx.ccx(), @/*bad*/copy loc.file.name), loc.line as int)
10611060
}
10621061
None => {
1063-
(V_filename: C_cstr(bcx.ccx(), @~"<runtime>"),
1064-
V_line: 0)
1062+
(C_cstr(bcx.ccx(), @~"<runtime>"), 0)
10651063
}
10661064
};
10671065
let ccx = bcx.ccx();
@@ -1300,11 +1298,11 @@ pub fn cleanup_and_leave(bcx: block,
13001298
if bcx.sess().trace() {
13011299
trans_trace(
13021300
bcx, None,
1303-
fmt!("cleanup_and_leave(%s)", cur.to_str()));
1301+
@fmt!("cleanup_and_leave(%s)", cur.to_str()));
13041302
}
13051303

13061304
match cur.kind {
1307-
block_scope(ref inf) if (*inf).cleanups.len() > 0u => {
1305+
block_scope(ref inf) if !inf.cleanups.is_empty() => {
13081306
for vec::find((*inf).cleanup_paths,
13091307
|cp| cp.target == leave).each |cp| {
13101308
Br(bcx, cp.dest);

src/librustc/middle/trans/controlflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ fn trans_fail_value(bcx: block,
380380
let sess = bcx.sess();
381381
let loc = sess.parse_sess.cm.lookup_char_pos(sp.lo);
382382
(C_cstr(bcx.ccx(), @/*bad*/ copy loc.file.name),
383-
V_line: loc.line as int)
383+
loc.line as int)
384384
}
385385
None => {
386386
(C_cstr(bcx.ccx(), @~"<runtime>"), 0)

src/librustc/middle/trans/datum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ pub impl Datum {
530530
if bcx.sess().trace() {
531531
trans_trace(
532532
bcx, None,
533-
fmt!("preserving until end of scope %d",
533+
@fmt!("preserving until end of scope %d",
534534
root_info.scope));
535535
}
536536

src/librustc/middle/trans/expr.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ fn trans_to_datum_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
409409
fn trans_rvalue_datum_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
410410
let _icx = bcx.insn_ctxt("trans_rvalue_datum_unadjusted");
411411

412-
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
412+
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
413413

414414
match expr.node {
415415
ast::expr_vstore(contents, ast::expr_vstore_box) |
@@ -456,7 +456,7 @@ fn trans_rvalue_stmt_unadjusted(bcx: block, expr: @ast::expr) -> block {
456456
let mut bcx = bcx;
457457
let _icx = bcx.insn_ctxt("trans_rvalue_stmt");
458458

459-
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
459+
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
460460

461461
match expr.node {
462462
ast::expr_break(label_opt) => {
@@ -537,7 +537,7 @@ fn trans_rvalue_dps_unadjusted(bcx: block, expr: @ast::expr,
537537
let _icx = bcx.insn_ctxt("trans_rvalue_dps_unadjusted");
538538
let tcx = bcx.tcx();
539539

540-
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
540+
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
541541

542542
match expr.node {
543543
ast::expr_paren(e) => {
@@ -728,7 +728,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
728728
debug!("trans_lvalue(expr=%s)", bcx.expr_to_str(expr));
729729
let _indenter = indenter();
730730

731-
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
731+
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
732732

733733
let unrooted_datum = unpack_datum!(bcx, unrooted(bcx, expr));
734734

0 commit comments

Comments
 (0)