rustboot: Emit an error instead of asserting in trans when a T is passed by value
This commit is contained in:
parent
429964b439
commit
ee901858a2
2 changed files with 21 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ tag list[T] {
|
|||
nil;
|
||||
}
|
||||
|
||||
fn foldl[T,U](&list[T] ls, U u, fn(&T t, U u) -> U f) -> U {
|
||||
fn foldl[T,U](&list[T] ls, &U u, fn(&T t, U u) -> U f) -> U {
|
||||
alt(ls) {
|
||||
case (cons[T](?hd, ?tl)) {
|
||||
auto u_ = f(hd, u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue