Skip to content

Commit 0567cb5

Browse files
committed
---
yaml --- r: 138736 b: refs/heads/try2 c: 8f263dd h: refs/heads/master v: v3
1 parent f19742d commit 0567cb5

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: d60747a24839c50165b0e2ea35592a7cb008f69b
8+
refs/heads/try2: 8f263dd0238ff85943a794bd3214ffa64b764a64
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/metadata/creader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct cache_entry {
6565
metas: @~[@ast::meta_item]
6666
}
6767

68-
fn dump_crates(+crate_cache: @mut ~[cache_entry]) {
68+
fn dump_crates(crate_cache: @mut ~[cache_entry]) {
6969
debug!("resolved crates:");
7070
for crate_cache.each |entry| {
7171
debug!("cnum: %?", entry.cnum);

branches/try2/src/librustc/metadata/loader.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ fn libname(cx: Context) -> (~str, ~str) {
8484
(str::from_slice(dll_prefix), str::from_slice(dll_suffix))
8585
}
8686

87-
fn find_library_crate_aux(cx: Context,
88-
(prefix, suffix): (~str, ~str),
89-
filesearch: filesearch::FileSearch) ->
90-
Option<(~str, @~[u8])> {
91-
let crate_name = crate_name_from_metas(/*bad*/copy cx.metas);
87+
fn find_library_crate_aux(
88+
cx: Context,
89+
(prefix, suffix): (~str, ~str),
90+
filesearch: filesearch::FileSearch
91+
) -> Option<(~str, @~[u8])> {
92+
let crate_name = crate_name_from_metas(cx.metas);
9293
let prefix: ~str = prefix + *crate_name + ~"-";
9394
let suffix: ~str = /*bad*/copy suffix;
9495
@@ -140,7 +141,7 @@ fn find_library_crate_aux(cx: Context,
140141
}
141142
}
142143

143-
pub fn crate_name_from_metas(+metas: &[@ast::meta_item]) -> @~str {
144+
pub fn crate_name_from_metas(metas: &[@ast::meta_item]) -> @~str {
144145
let name_items = attr::find_meta_items_by_name(metas, ~"name");
145146
match vec::last_opt(name_items) {
146147
Some(i) => {

branches/try2/src/librustc/middle/astencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub fn encode_inlined_item(ecx: @e::EncodeContext,
105105
pub fn decode_inlined_item(cdata: @cstore::crate_metadata,
106106
tcx: ty::ctxt,
107107
maps: Maps,
108-
+path: ast_map::path,
108+
path: ast_map::path,
109109
par_doc: ebml::Doc)
110110
-> Option<ast::inlined_item> {
111111
let dcx = @DecodeContext {

branches/try2/src/librustc/middle/check_match.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn check_expr(cx: @MatchCheckCtxt, ex: @expr, &&s: (), v: visit::vt<()>) {
7171
arm.pats);
7272
}
7373

74-
check_arms(cx, (/*bad*/copy *arms));
74+
check_arms(cx, *arms);
7575
/* Check for exhaustiveness */
7676
// Check for empty enum, because is_useful only works on inhabited
7777
// types.
@@ -108,12 +108,12 @@ pub fn check_expr(cx: @MatchCheckCtxt, ex: @expr, &&s: (), v: visit::vt<()>) {
108108
}
109109

110110
// Check for unreachable patterns
111-
pub fn check_arms(cx: @MatchCheckCtxt, arms: ~[arm]) {
111+
pub fn check_arms(cx: @MatchCheckCtxt, arms: &[arm]) {
112112
let mut seen = ~[];
113113
for arms.each |arm| {
114114
for arm.pats.each |pat| {
115115
let v = ~[*pat];
116-
match is_useful(cx, copy seen, v) {
116+
match is_useful(cx, &seen, v) {
117117
not_useful => {
118118
cx.tcx.sess.span_err(pat.span, ~"unreachable pattern");
119119
}

0 commit comments

Comments
 (0)