Commit Graph

1294 Commits

Author SHA1 Message Date
bors
1f1838ea3e auto merge of #11123 : alan-andrade/rust/move_wiki_to_internal_docs, r=brson
This is not done yet but I'm posting it to get feedback.

The wiki has a ton of different tutorials/manuals/faq and so forth. Instead of migrating all of them right now, I just migrated the following:

* The general main wiki page
* Language FAQ
* Project FAQ

If this feels reasonable, please comment so that I can continue with confidence.
2014-01-06 14:26:38 -08:00
Alan Andrade
e53b5661a7 First phase of migrating the wiki to the internal docs #11078 2014-01-06 15:27:49 -06:00
bors
3afa0b97c4 auto merge of #11335 : rlane/rust/fix-vector-doc, r=alexcrichton 2014-01-06 11:56:37 -08:00
Rich Lane
8bd52024ae doc: update reference to new vector size syntax 2014-01-05 22:38:16 -08:00
bors
b6a1fde1c6 auto merge of #11106 : alan-andrade/rust/convert_tutorials_to_guides, r=cmr
* Moved every the tutorial-*.md into its own directory `/doc/guides/`
* Makefile is aware
2014-01-05 22:11:39 -08:00
Alan Andrade
eeafee4c9b Convert sub tutorials into Guides #10838
Ensure configure creates doc/guides directory

Fix configure makefile and tests

Remove old guides dir and configure option, convert testing to guide

Remove ignored files

Fix submodule issue

prepend dir in makefile so that bor knows how to build the docs

S to uppercase
2014-01-05 22:48:19 -06:00
Lindsey Kuper
8224816a34 tutorial: add missing line to make example build. 2014-01-05 22:03:13 -05:00
Lindsey Kuper
4f1ebef96a tutorial: remove duplicate words. 2014-01-05 22:03:13 -05:00
Lindsey Kuper
60e139409f tutorial: change float to f32 since float is no longer a type. 2014-01-05 22:03:13 -05:00
Lindsey Kuper
5681c711e1 Wording tweak suggested by @pcwalton. 2014-01-05 22:03:12 -05:00
Lindsey Kuper
62b74d9890 Write up default methods for the tutorial. 2014-01-05 22:03:12 -05:00
Brian Anderson
01af682c64 doc: Fix an inexplicable error in a tutorial example
This code was wrong but apparently worked before removing struct
deref. I don't know why.
2014-01-04 14:44:14 -08:00
Brian Anderson
ec69dea6f7 doc: Fix tutorial for struct deref 2014-01-04 14:44:14 -08:00
bors
14c24accbc auto merge of #11271 : adridu59/rust/patch-io, r=huonw 2014-01-04 06:26:52 -08:00
Adrien Tétar
ba801577b9 doc: un-xfail conditions tutorial 2014-01-04 13:06:54 +01:00
bors
239fb1f6ee auto merge of #11283 : brson/rust/doublefailure, r=alexcrichton
Previously this was an `rtabort!`, indicating a runtime bug. Promote
this to a more intentional abort and print a (slightly) more
informative error message.

Can't test this sense our test suite can't handle an abort exit.

I consider this to close #910, and that we should open another issue about implementing less conservative semantics here.
2014-01-04 00:32:09 -08:00
bors
3dd7c49faf auto merge of #11251 : pcwalton/rust/remove-at-mut, r=pcwalton
r? @nikomatsakis 

for the borrow checker changes. Write guards are now eliminated.
2014-01-03 22:36:53 -08:00
Patrick Walton
8092153634 libsyntax: Fix tests. 2014-01-03 22:22:40 -08:00
bors
8bfd2a84cf auto merge of #11277 : brson/rust/more0.9, r=alexcrichton 2014-01-03 17:16:50 -08:00
Patrick Walton
9b35ae75d2 doc: Remove all mentions of @mut from the documentation. 2014-01-03 14:02:01 -08:00
bors
bb9c5c48ef auto merge of #11052 : jvns/rust/testing-tutorial, r=brson
There's no explanation anywhere right now of how to do testing with Rust, so here's a basic explanation of how to write and run a test.
2014-01-02 23:56:53 -08:00
Brian Anderson
649c648d6f Abort on double-failure. #910
Previously this was an rtabort!, indicating a runtime bug. Promote
this to a more intentional abort and print a (slightly) more
informative error message.

Can't test this sense our test suite can't handle an abort exit.
2014-01-02 18:46:29 -08:00
Brian Anderson
1155ee9ee9 Bump more version numbers to 0.9 2014-01-02 10:55:28 -08:00
Julia Evans
f0322371dd Add testing tutorial to docs 2013-12-31 10:34:55 -05:00
a_m0d
7a8ca91e1d Update documentation to remove reference to ::rt logging 2013-12-31 07:25:53 -05:00
bors
6db7e35c59 auto merge of #11190 : eliovir/rust/patch-3, r=alexcrichton
#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
replace `pkgid` by `crate_id`
add `comment`
2013-12-30 07:16:48 -08:00
bors
a4f30bf0c0 auto merge of #11185 : huonw/rust/doc-ignore, r=cmr
Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
2013-12-30 05:51:51 -08:00
Huon Wilson
582ad8ffc2 rustdoc: only filter lines starting with '# ' from the shown code.
Currently any line starting with `#` is filtered from the output,
including line like `#[deriving]`; this patch makes it so lines are only
filtered when followed by a space similar to the current behaviour of
the tutorial/manual tester.
2013-12-30 16:55:49 +11:00
Luis de Bethencourt
51b5f32d33 Update Docs to use crateid 2013-12-29 15:25:43 -05:00
eliovir
466065946f rust.md : update crate attributes.
#[ author = "Jane Doe" ]; raises "warning: unknown crate attribute"
2013-12-29 12:37:51 +01:00
eliovir
743d39293f Update tutorial.md : rename pkgid to crate_id 2013-12-28 10:32:03 +01:00
Alex Crichton
f9b231cd08 Fixing more doc tests 2013-12-23 09:10:37 -08:00
Alex Crichton
316345610a doc: Expand rustdoc's documentation for testing 2013-12-23 09:10:37 -08:00
bors
d5d5c5064b auto merge of #10986 : adridu59/rust/patch-new, r=alexcrichton
Thanks to @huonw for some mentoring. 🍰
2013-12-20 12:41:33 -08:00
Adrien Tétar
bf5f2f2631 doc: forward-port the conditions tutorial + fixup libstd example 2013-12-20 18:40:26 +01:00
bors
d5798b3902 auto merge of #10972 : metajack/rust/pkgid-with-name, r=alexcrichton
This change extends the pkgid attribute to allow of explicit crate names, instead of always inferring them based on the path. This means that if your GitHub repo is called `rust-foo`, you can have your pkgid set your library name to `foo`. You'd do this with a pkgid attribute like `github.com/somewhere/rust-foo#foo:1.0`.

This is half of the fix for #10922.
2013-12-17 07:41:40 -08:00
Jack Moffitt
262cc4a2bc Update docs to new syntax. 2013-12-17 07:41:39 -07:00
bors
47c9a35747 auto merge of #10830 : alexcrichton/rust/spsc-queue, r=brson
This pull request completely rewrites std::comm and all associated users. Some major bullet points

* Everything now works natively
* oneshots have been removed
* shared ports have been removed
* try_recv no longer blocks (recv_opt blocks)
* constructors are now Chan::new and SharedChan::new
* failure is propagated on send
* stream channels are 3x faster

I have acquired the following measurements on this patch. I compared against Go, but remember that Go's channels are fundamentally different than ours in that sends are by-default blocking. This means that it's not really a totally fair comparison, but it's good to see ballpark numbers for anyway

```
          oneshot         stream          shared1
std         2.111           3.073          1.730 
my          6.639           1.037          1.238 
native      5.748           1.017          1.250 
go8         1.774           3.575          2.948 
go8-inf     slow            0.837          1.376 
go8-128     4.832           1.430          1.504 
go1         1.528           1.439          1.251 
go2         1.753           3.845          3.166 
```

I had three benchmarks:

* oneshot - N times, create a "oneshot channel", send on it, then receive on it (no task spawning)
* stream - N times, send from one task to another task, wait for both to complete
* shared1 - create N threads, each of which sends M times, and a port receives N*M times.

The rows are as follows:

* `std` - the current libstd implementation (before this pull request)
* `my` - this pull request's implementation (in M:N mode)
* `native` - this pull request's implementation (in 1:1 mode)
* `goN` - go's implementation with GOMAXPROCS=N. The only relevant value is 8 (I had 8 cores on this machine)
* `goN-X` - go's implementation where the channels in question were created with buffers of size `X` to behave more similarly to rust's channels.
2013-12-17 01:16:43 -08:00
Alex Crichton
39a6c9d637 Test fallout from std::comm rewrite 2013-12-16 22:55:49 -08:00
Patrick Walton
865701787c doc: Update the documentation to describe the Pod trait. 2013-12-16 22:38:02 -08:00
bors
9eb89a6c6e auto merge of #10982 : ezyang/rust/lvalue-def, r=pcwalton
Based off of Niko's proposed definition of lvalues.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-15 15:16:28 -08:00
Huon Wilson
164f7a290e std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut []. 2013-12-15 23:37:41 +11:00
Edward Z. Yang
b1b905f30b Correct definition of lvalues, fixes #10890
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-15 20:31:05 +08:00
Huon Wilson
f53292f7ee Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}. 2013-12-15 23:05:30 +11:00
bors
53d1a67bbd auto merge of #10944 : metajack/rust/pkgid-docs, r=cmr 2013-12-14 08:11:29 -08:00
bors
fbbadae80f auto merge of #10849 : adridu59/rust/patch-css, r=alexcrichton
rustdoc:
- fix search-bar layout

doc: CSS:
- switch to native pandoc toc depth
- rm some dead code
- clamp width to be readable (we're not Wikipedia!)
- don't background-color titles, it's bloating
- make syntax-highlighting colors inline with rust-lang.org
- space indents

@alexcrichton
2013-12-13 14:21:35 -08:00
Adrien Tétar
1999b25310 doc: CSS changes + commit improved favicon 2013-12-13 21:50:26 +01:00
bors
ae3078ca25 auto merge of #10913 : cmr/rust/rustdoc_man, r=huonw
Clarify that it's sundown, and that we don't support magic
2013-12-13 11:31:57 -08:00
Jack Moffitt
da9a02a189 Update documentation for new pkgid attribute. 2013-12-12 15:22:23 -07:00
Erik Price
5731ca3078 Make 'self lifetime illegal.
Also remove all instances of 'self within the codebase.

This fixes #10889.
2013-12-11 10:54:06 -08:00