bors
6d6f086928
Auto merge of #26118 - tshepang:define-trait, r=steveklabnik
...
I saw a variation of this definition in [an article](http://pcwalton.github.io/blog/2012/08/08/a-gentle-introduction-to-traits-in-rust ) by @pcwalton.
2015-06-13 08:34:12 +00:00
bors
7c38de89d4
Auto merge of #26108 - Marwes:field_pun_docs, r=steveklabnik
...
Adds a mention for the short form pattern syntax. Now without creating a PR to my own fork!
#25779
2015-06-13 07:00:26 +00:00
Markus Westerlind
219ddd1f61
Mention the short form pattern syntax in the book
...
Explains short form pattern syntax and then introduces the longer
pattern matching as a rebinding of the fields instead.
#25779
2015-06-12 18:18:45 +02:00
Matt Brubeck
334ce91443
[reference] Fix typo in extern fn section
2015-06-12 08:08:48 -07:00
Manish Goregaokar
a9ea380523
Rollup merge of #26231 - reem:patch-2, r=Gankro
...
r? @steveklabnik
2015-06-12 11:55:37 +05:30
Manish Goregaokar
8f841b24ca
Rollup merge of #26229 - Stebalien:versionless-book, r=steveklabnik
...
They're forever doomed to be out-of-date. Also, don't assume the user is
installing a particular version.
r? @steveklabnik
2015-06-12 11:55:37 +05:30
Manish Goregaokar
18f70e3498
Rollup merge of #24495 - nathanl:nathanl-explain-bin-flag, r=steveklabnik
...
Explain the --bin flag in terms of the difference
between shipping binary and library code
I'm not sure if my explanation is even quite correct, but as a newbie coming from Ruby, this is my best guess. (In Rubyland, libraries always ship with the source code because there's no other form you can ship. :) )
2015-06-12 11:55:37 +05:30
Jonathan Reem
3c6dcea985
Add Terminal.com to the list of companies using rust in production.
2015-06-11 16:07:34 -07:00
Steven Allen
e2e292cc00
Don't link to specific versions of rust in the book.
...
They're forever doomed to be out-of-date. Also, don't assume the user is
installing a particular version.
2015-06-11 17:33:18 -04:00
bors
deff2f50a9
Auto merge of #26212 - Manishearth:rollup, r=Manishearth
...
- Successful merges: #26181 , #26184 , #26189 , #26191 , #26195 , #26202
- Failed merges:
2015-06-11 16:33:53 +00:00
Nathan Long
a47d7a752e
Explain the --bin
flag more clearly
2015-06-11 09:20:14 -04:00
bors
fc9e424550
Auto merge of #26172 - nham:add_E0116, r=alexcrichton
...
Also improves the wording of the E0133 description.
cc #24407
2015-06-11 10:06:38 +00:00
Manish Goregaokar
95407cc627
Rollup merge of #26191 - jimblandy:master, r=steveklabnik
...
In the discussion of returning closures, it seems like the example code got simplified, but only the later copies got fixed. The final working code has `factory` returning `|x| x + num`, but the earlier code has `|x| vec.push(x)`.
The first form seemed to have more distracting characteristics, and the code wasn't right anyway, so I changed them to all use the second form, and updated the error messages.
r? @steveklabnik
2015-06-11 12:50:53 +05:30
Manish Goregaokar
bdebe94433
Rollup merge of #26181 - Stebalien:fix-26178, r=steveklabnik
...
The list of in-production users is probably incomplete. It's based on a [post](https://www.reddit.com/r/rust/comments/2x567m/who_is_using_rust_or_what_projects_that_are/cox7eby ) by /u/mozilla_kmc
closes #26178
2015-06-11 12:50:52 +05:30
Jim Blandy
7d298d1ace
Fix examples for returning closures.
2015-06-10 13:17:49 -07:00
Manish Goregaokar
c8519c9793
Rollup merge of #26174 - mcast:trpl-assignment-empty-tuple, r=steveklabnik
...
Doc patch for #26120 . Extra words here, because "value" is repeated.
I haven't read about whether/how it should go to stable (sorry), but I think it would help newcomers.
Thanks,
2015-06-10 22:07:10 +05:30
Manish Goregaokar
7d9427e6cd
Rollup merge of #26146 - steveklabnik:remove_unsafe_pointer, r=Gankro
...
Using two terms for one thing is confusing, these are called 'raw pointers' today.
2015-06-10 22:07:10 +05:30
Manish Goregaokar
ef089ff70d
Rollup merge of #26145 - steveklabnik:gh25853, r=brson
...
Fixes #25853
2015-06-10 22:07:10 +05:30
Manish Goregaokar
c84aff92b9
Rollup merge of #26142 - steveklabnik:gh25850, r=Gankro
...
Fixes #25850
2015-06-10 22:07:09 +05:30
Steven Allen
44007f2701
Rust is now post-1.0
...
closes #26178
2015-06-10 12:25:01 -04:00
Matthew Astley
aaf1983a56
mend bad Markdown
2015-06-10 16:16:03 +01:00
Matthew Astley
1ece005838
trpl: why (assignment == empty tuple) #26120
2015-06-10 11:02:31 +01:00
Nick Hamann
c8b088eb38
Add explanation for E0116 and update the error message.
...
Also updates the reference on this point.
2015-06-10 02:18:14 -05:00
bors
6c5834d81b
Auto merge of #26137 - steveklabnik:gh25623, r=alexcrichton
...
Fixes #25623
I am bad with BNF, so I may have messed this up, but that's what review is for!
2015-06-10 06:59:31 +00:00
bors
2228ce10c6
Auto merge of #25836 - steveklabnik:gh25305, r=alexcrichton
...
Fixes #25794
2015-06-09 23:11:25 +00:00
Steve Klabnik
6b6b380fd1
Rollup merge of #26144 - steveklabnik:static_doc_fix, r=alexcrichton
...
Fixes #25851
I am 99% sure this is true for all `static`s and not just `static mut`, yes?
2015-06-09 17:24:45 -04:00
Steve Klabnik
9bcae312a3
Rollup merge of #26140 - steveklabnik:gh25803, r=alexcrichton
...
As this example got changed, we stopped showing how to return self as
the first example, so this text is outdated.
Fixes #25803
2015-06-09 17:24:45 -04:00
Steve Klabnik
b38e9a73d4
Rollup merge of #26136 - steveklabnik:gh25597, r=alexcrichton
...
Fixes #25597
2015-06-09 17:24:44 -04:00
Steve Klabnik
d16906283a
Rollup merge of #26134 - steveklabnik:gh25586, r=alexcrichton
...
After talking with @graydon on #rust-internals, this is hopefully clarifying.
Fixes #25586
@mkpankov, what do you think?
2015-06-09 17:24:44 -04:00
Steve Klabnik
496fe4d51a
Rollup merge of #26133 - steveklabnik:gh25573, r=alexcrichton
...
This obscures more than it helps.
Fixes #25573
2015-06-09 17:24:44 -04:00
Steve Klabnik
67bb4e9356
Rollup merge of #26129 - steveklabnik:gh26012, r=brson
...
Fixes #26012
2015-06-09 17:24:43 -04:00
Steve Klabnik
c7de6aa342
Rollup merge of #26125 - nsimplex:master, r=steveklabnik
...
The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
2015-06-09 17:24:43 -04:00
Steve Klabnik
32c6deec07
Rollup merge of #26111 - tshepang:consistency, r=brson
2015-06-09 17:24:42 -04:00
Steve Klabnik
2c75256c15
Exise 'unsafe pointer' in favor of 'raw pointer'
...
Using two terms for one thing is confusing, these are called 'raw pointers' today.
2015-06-09 16:49:24 -04:00
Steve Klabnik
34e5c24c5d
make note of slicing syntax in TRPL: strings
...
Fixes #25853
2015-06-09 16:37:47 -04:00
Steve Klabnik
9db9449836
Make note about static and dtors
...
Fixes #25851
2015-06-09 16:30:39 -04:00
Steve Klabnik
b242a86864
Mention that enum constructors are functions
...
Fixes #25850
2015-06-09 16:12:45 -04:00
Steve Klabnik
a95b48c2dd
Fix some copyediting in TRPL: method-syntax
...
As this example got changed, we stopped showing how to return self as
the first example, so this text is outdated.
Fixes #25803
2015-06-09 15:49:57 -04:00
Steve Klabnik
a0b08f387b
Explain interaction with if and | in patterns
...
Fixes #26012
2015-06-09 15:40:09 -04:00
Steve Klabnik
6bddfc9650
Fix up macro grammar
...
Fixes #25623
2015-06-09 15:26:51 -04:00
Steve Klabnik
e12c420522
Expand a bit on clone() in Dining Philosophers
...
Fixes #25597
2015-06-09 15:24:44 -04:00
Steve Klabnik
a9899a7353
Clarify confusing sentence in TRPL: FFI
...
After talking with @graydon on #rust-internals, this is hopefully clarifying.
Fixes #25586
2015-06-09 15:17:30 -04:00
Steve Klabnik
f62ad7d7df
remove stuff about #define
...
This obscures more than it helps.
Fixes #25573
2015-06-09 14:59:25 -04:00
simplex
0a70c94d68
Semantic accuracy in borrow scope rules.
...
The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
2015-06-09 13:08:16 -03:00
Tshepang Lekhonkhobe
e2a1afa1c2
book: define trait
2015-06-09 02:32:29 +02:00
Manish Goregaokar
fd2c76cd94
Rollup merge of #26113 - tshepang:avoid-abbreviations, r=steveklabnik
2015-06-09 05:42:29 +05:30
Manish Goregaokar
38a606ac67
Rollup merge of #26112 - tshepang:readability, r=steveklabnik
2015-06-09 05:42:28 +05:30
Manish Goregaokar
0d6f11b09b
Rollup merge of #26105 - tshepang:sentence-not-clear, r=steveklabnik
2015-06-09 05:42:28 +05:30
Manish Goregaokar
65eb6c072b
Rollup merge of #26104 - saml:patch-1, r=steveklabnik
...
Cargo expects `lib` to be table, not an array of tables (only single lib per project).
2015-06-09 05:42:28 +05:30
Manish Goregaokar
c95da07eb0
Rollup merge of #26078 - diwic:patch-2, r=alexcrichton
...
It was determined that no leaks were unsafe, make the language reference clear about this.
2015-06-09 05:42:27 +05:30