Skip to content

Commit 538813c

Browse files
committed
---
yaml --- r: 139259 b: refs/heads/try2 c: e7f42f1 h: refs/heads/master i: 139257: 3644e97 139255: 5930303 v: v3
1 parent 4fd8ee5 commit 538813c

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
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: 89a7407c999449c56f9b00145cfbdfbb49fbde7c
8+
refs/heads/try2: e7f42f140b8d2271888f97ba62c5e0570032b6e5
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/trans/tvec.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,11 @@ pub fn write_content(bcx: block,
414414
return bcx;
415415
}
416416

417+
// Some cleanup would be required in the case in which failure happens
418+
// during a copy. But given that copy constructors are not overridable,
419+
// this can only happen as a result of OOM. So we just skip out on the
420+
// cleanup since things would *probably* be broken at that point anyways.
421+
417422
let elem = unpack_datum!(bcx, {
418423
expr::trans_to_datum(bcx, element)
419424
});

branches/try2/src/test/run-pass/repeated-vector-syntax.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@
99
// except according to those terms.
1010

1111
pub fn main() {
12+
struct Foo { a: ~str }
13+
14+
let v = [ ~Foo { a: ~"Hello!" }, ..129 ];
15+
let w = [ ~"Hello!", ..129 ];
1216
let x = [ @[true], ..512 ];
1317
let y = [ 0, ..1 ];
18+
19+
error!("%?", v);
20+
error!("%?", w);
1421
error!("%?", x);
1522
error!("%?", y);
1623
}

0 commit comments

Comments
 (0)