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
rust
/
src
/
test
/
run-pass
/
vec-push.rs
6 lines
100 B
Rust
Raw
Normal View
History
Unescape
Escape
rustc: Add a testcase for vector push (mutable aliases with *, really)
2011-04-28 16:22:13 -07:00
Switch to new param kind bound syntax And remove support for the old syntax
2012-01-05 15:35:37 +01:00
fn
push
<
T
:
copy
>
(
&
v
:
[
const
T
]
,
t
:
T
)
{
v
+
=
[
t
]
;
}
Reformat source tree (minus a couple tests that are still grumpy).
2011-06-15 11:19:50 -07:00
Reformat This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-19 15:16:48 -07:00
fn
main
(
)
{
let
v
=
[
1
,
2
,
3
]
;
push
(
v
,
1
)
;
}
Reference in New Issue
Copy Permalink