Skip to content

Commit 8b9ec32

Browse files
committed
---
yaml --- r: 3079 b: refs/heads/master c: 05b7eb6 h: refs/heads/master i: 3077: 9286ebc 3075: 6623f68 3071: fa4a634 v: v3
1 parent f592894 commit 8b9ec32

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: e6f87a75250088e248e56d81e5a384f7b4909210
2+
refs/heads/master: 05b7eb6dff850ef9265f09ed18baf7f09590bf72

trunk/src/comp/middle/typeck.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,17 @@ mod collect {
527527
fn ty_of_arg(@ctxt cx, &ast::arg a) -> ty::arg {
528528
auto ty_mode = ast_mode_to_mode(a.mode);
529529
auto f = bind getter(cx, _);
530-
ret rec(mode=ty_mode, ty=ast_ty_to_ty(cx.tcx, f, a.ty));
530+
auto tt = ast_ty_to_ty(cx.tcx, f, a.ty);
531+
if (ty::type_has_dynamic_size(cx.tcx, tt)) {
532+
alt (ty_mode) {
533+
case (mo_val) {
534+
cx.tcx.sess.span_err(a.ty.span,
535+
"Dynamically sized arguments must be passed by alias");
536+
}
537+
case (_) { }
538+
}
539+
}
540+
ret rec(mode=ty_mode, ty=tt);
531541
}
532542

533543
fn ty_of_method(@ctxt cx, &@ast::method m) -> ty::method {

trunk/src/snapshots.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
S 2011-06-14 c3015b8
2-
linux-i386 b091d33519a1bbf6cf12ee1954a1607940ae3915
3-
macos-i386 7d47cece095a7b30f5a3e2467417652d3b2353e5
4-
winnt-i386 27d57fd96d2c328d83fcbf7322035019377ab40f
5-
61
S 2011-06-09 efcf857
72
linux-i386 af8e6dba00bdf290768251d55bdda9cba6752e4f
83
macos-i386 0c45af8b96effa957906d1d6a2e05bffd627aa51

0 commit comments

Comments
 (0)