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
3473ff3bff
rust
/
src
/
test
/
run-pass
/
generic-bind.rs
9 lines
99 B
Rust
Raw
Normal View
History
Unescape
Escape
rustboot: Emit an error instead of asserting in trans when a T is passed by value
2010-10-28 17:02:00 -05:00
fn
id
[
T
]
(
&
T
t
)
->
T
{
Teach bind to actually bind typarams, as it claims to.
2010-10-10 02:14:26 -05:00
ret
t
;
}
fn
main
(
)
{
auto
f
=
bind
id
[
int
]
(
_
)
;
check
(
f
(
10
)
=
=
10
)
;
rustboot: Emit an error instead of asserting in trans when a T is passed by value
2010-10-28 17:02:00 -05:00
}
Reference in New Issue
Copy Permalink