This website requires JavaScript.
Explore
Help
Register
Sign In
mikros
/
rust
Watch
1
Star
0
Fork
0
You've already forked rust
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
594c7fb0c6
rust
/
src
/
test
/
run-pass
/
bind-parameterized-args.rs
8 lines
111 B
Rust
Raw
Normal View
History
Unescape
Escape
In typeck, check for dynamically sized by-value arguments to thunks A check in trans didn't have a corresponding check in typeck, causing some programs (to wit, compile-fail/chan-parameterized-args.rs - part of this commit) to fail with an assertion failure in trans instead of a type error. Fixed it. In short, arguments that are future thunk arguments (any spawn arguments, and _ arguments in bind) need to either not contain type params or type vars, or be by-reference. Closes #665.
2011-07-11 19:26:40 -05:00
fn
main
(
)
{
Reformat for new syntax
2011-07-27 07:19:39 -05:00
fn
echo
[
T
]
(
c
:
int
,
x
:
vec
[
T
]
)
{
}
Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.
2011-07-13 17:44:09 -05:00
Reformat for new syntax
2011-07-27 07:19:39 -05:00
let
y
:
fn
(
vec
[
int
]
)
=
bind
echo
(
42
,
_
)
;
In typeck, check for dynamically sized by-value arguments to thunks A check in trans didn't have a corresponding check in typeck, causing some programs (to wit, compile-fail/chan-parameterized-args.rs - part of this commit) to fail with an assertion failure in trans instead of a type error. Fixed it. In short, arguments that are future thunk arguments (any spawn arguments, and _ arguments in bind) need to either not contain type params or type vars, or be by-reference. Closes #665.
2011-07-11 19:26:40 -05:00
Reformat for new syntax
2011-07-27 07:19:39 -05:00
y
(
[
1
]
)
;
Have bind support non-alias parametric non-bound arguments. This was previously disallowed by the typechecker and not properly handled in trans. I removed the typechecker check (replacing it with a simpler check that spawned functions don't have type params) and fixed trans. Closes #756.
2011-07-27 20:39:57 -05:00
}
Reference in New Issue
Copy Permalink