Commit Graph

3932 Commits

Author SHA1 Message Date
Guillaume Gomez
6597a28144 Rollup merge of #35324 - ubsan:precedence, r=steveklabnik
Fix precedence table in reference

Adds `..` and `...` and puts them above `=`

r? @steveklabnik
2016-08-05 16:12:59 +02:00
Guillaume Gomez
6e5e7e2ea0 Rollup merge of #35189 - mLuby:patch-1, r=steveklabnik
Update the-stack-and-the-heap.md

Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-05 16:12:55 +02:00
Guillaume Gomez
7971a93698 Rollup merge of #35137 - jongiddy:explicit-wildcard, r=steveklabnik
Provide more explicit example of wildcard version in guessing game doc.

Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning.  Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token.  Make the correct
format more explicit, to remove one potential source of frustration.
2016-08-05 16:12:54 +02:00
ubsan
76babf9c8e Fix precedence table in reference 2016-08-04 13:28:24 -07:00
mLuby
d90c16625f Update the-stack-and-the-heap.md
Was surprised to learn that heaps were used in this way, then realized upon reading [the linked paper](http://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/dsa.pdf) that it's a totally different type of heap—an important distinction.
2016-08-02 14:08:19 -07:00
Eduard Burtescu
b583711ff9 Ignore the lang-items example in the book. 2016-08-02 09:02:19 +03:00
Jonathan Giddy
b77b9b72fe Provide more explicit example of wildcard version in guessing game doc.
Beginners may try to adapt the tutorial to develop their own code.
When using different dependencies, they may use the wildcard for
versioning.  Since they are new to the language, they will not know
that the wildcard asterisk is a string, not a token.  Make the correct
format more explicit, to remove one potential source of frustration.
2016-07-31 12:44:41 +01:00
bors
1225e122fd Auto merge of #34904 - petrochenkov:rustcall, r=nikomatsakis
Properly feature gate all unstable ABIs

Fixes https://github.com/rust-lang/rust/issues/34900
[breaking-change]
r? @pnkfelix

---
Function-visiting machinery for AST/HIR is surprisingly error-prone, it's *very* easy to miss some cases or visit something twice while writing a visitor. This is the true problem behind https://github.com/rust-lang/rust/issues/34900. I'll try to restructure these visitors a bit and send one more PR later.
2016-07-30 15:58:20 -07:00
Guillaume Gomez
5f5fdf64f1 Rollup merge of #35103 - brettcannon:patch-1, r=Manishearth
Try to clear up some awkward wording
2016-07-29 11:57:54 +02:00
Brett Cannon
3563e400cc Try to clear up some awkward wording 2016-07-28 19:02:25 -07:00
Alex Burka
29546dd06d remove claim about searching through nested fields for the nullable type, even though that is how it works 2016-07-27 13:58:51 -04:00
Alex Burka
1319b293c6 fix typo 2016-07-27 13:58:51 -04:00
Alex Burka
8e7abea93e revert libc changes 2016-07-27 13:58:51 -04:00
Alex Burka
54ecc210ec hack to make example compile 2016-07-27 13:58:51 -04:00
Alex Burka
5276b29670 change confusing wording about discriminant 2016-07-27 13:58:51 -04:00
Alex Burka
fae3335272 extern fns require named parameters
Not sure the example is going to stay, but I can try to pass Travis for the bragging rights.
2016-07-27 13:58:51 -04:00
Alex Burka
1cceca8dfd foreign function interface interface 2016-07-27 13:58:51 -04:00
Alex Burka
0016af5f13 not just a single field 2016-07-27 13:58:51 -04:00
Alex Burka
84366b6f28 recursion 2016-07-27 13:58:51 -04:00
Alex Burka
cc2fc48dec expand nullable pointer example 2016-07-27 13:58:51 -04:00
Alex Burka
48ce20653a generics-agnostic description 2016-07-27 13:58:51 -04:00
Alex Burka
032ea41e99 book/ffi: nullable pointer, libc cleanups
Expand the "nullable pointer optimization" section with a code example.

Change examples to use std::os::raw instead of libc, when applicable.
2016-07-27 13:58:51 -04:00
Steve Klabnik
d64de045c9 Rollup merge of #35043 - rahiel:patch-1, r=nikomatsakis
doc/book/trait-objects: remove empty lines at start of examples

I think it looks better without them.
2016-07-26 17:21:14 -04:00
Steve Klabnik
96108bbb94 Rollup merge of #34990 - abhijeetbhagat:patch-3, r=steveklabnik
Update underscore usage (#34903)
2016-07-26 17:21:12 -04:00
Steve Klabnik
a56741f832 Rollup merge of #34850 - tshepang:patch-3, r=steveklabnik
doc: add missing pause
2016-07-26 17:21:11 -04:00
Steve Klabnik
493cb979c6 Rollup merge of #34461 - ubsan:master, r=steveklabnik
Fix ABI string docs in reference.md
2016-07-26 17:21:10 -04:00
Rahiel Kasim
47db8deff6 doc/book/trait-objects: remove empty lines at start of examples 2016-07-26 11:14:46 +02:00
abhi
6ebe6e8f80 Update underscore usage (#34903) 2016-07-23 13:15:09 +05:30
Tshepang Lekhonkhobe
b0de62064c doc: add missing pause 2016-07-21 21:11:34 +02:00
Guillaume Gomez
9ba1792aac Rollup merge of #34880 - xitep:master, r=steveklabnik
Make .enumerate() example self-explanatory

Should resolve #34624
2016-07-21 11:27:00 +02:00
Vadim Petrochenkov
9292c0bc91 Properly feature gate all unstable ABIs 2016-07-18 22:51:18 +03:00
Ximin Luo
8aaf0f894b doc/book: fix tests for non-x86 architectures, such as aarch64
`rustdoc --test` gets confused when "main" exists for some architectures but not others.
2016-07-17 21:00:24 +02:00
Novotnik, Petr
3b5d71e0cf Make .enumerate() example self-explanatory 2016-07-17 12:06:10 +02:00
Guillaume Gomez
45f8427d47 Rollup merge of #34849 - tshepang:patch-2, r=apasel422
doc: remove extraneous word
2016-07-16 16:55:59 +02:00
Guillaume Gomez
9d622d9e7e Rollup merge of #34848 - tshepang:patch-1, r=apasel422
doc: remove stray comma
2016-07-16 16:55:59 +02:00
Guillaume Gomez
f7e4545d1a Rollup merge of #34847 - baskerville:unwanted-tag, r=apasel422
Add missing inline code delimiters around Vec<T>

r? @steveklabnik
2016-07-16 16:55:59 +02:00
Guillaume Gomez
689fde2735 Rollup merge of #34838 - steveklabnik:gh33677, r=alexcrichton
Fix up documentation around no_std

1. Fix the sections in the book to have the correct signatures. I've
   also marked them as `ignore`; there's no way to set the `no_std`
   feature for libc, so it pulls in the stdlib, so this wasn't even
   testing the actual thing it was testing. Better to just ignore.
2. Correcting libcore's docs for factual inaccuracy, and add a note
   about language items.

Fixes #33677

r? @alexcrichton
2016-07-16 16:55:59 +02:00
Guillaume Gomez
1fb707dab5 Rollup merge of #33362 - andradei:master, r=Manishearth
Add mention to RFC 940 in the Rust Reference.

This PR adds a mention to hyphens in Cargo package names being replaced by underscores when used as a crate, as per [RFC 940](https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md)

It also formats the RFCs consistently as RFC XXX instead of RFCXXX.
2016-07-16 16:55:57 +02:00
Tshepang Lekhonkhobe
29ca456dfc doc: remove extraneous word 2016-07-16 11:13:29 +02:00
Tshepang Lekhonkhobe
cc2176d3fe doc: remove stray comma 2016-07-16 11:10:05 +02:00
Bastien Dejean
fc0d037265 Add missing inline code delimiters around Vec<T> 2016-07-16 10:50:19 +02:00
Steve Klabnik
fcecdac96d Fix up documentation around no_std
1. Fix the sections in the book to have the correct signatures. I've
   also marked them as `ignore`; there's no way to set the `no_std`
   feature for libc, so it pulls in the stdlib, so this wasn't even
   testing the actual thing it was testing. Better to just ignore.
2. Correcting libcore's docs for factual inaccuracy, and add a note
   about language items.

Fixes #33677
2016-07-15 15:41:31 -04:00
吴冉波
db2649363b doc: ffi referenced rust-snappy can not compile
r? @steveklabnik

The referenced code https://github.com/thestinger/rust-snappy can not work. Maybe it's the old rust version? I do not know.
So I try to rewrite these test cases. If it is not what you originally meaning, just ignored it.
2016-07-13 21:53:27 +08:00
bors
2ab18ce6f7 Auto merge of #34660 - jseyfried:fix_parse_stmt, r=nrc
Fix bugs in macro-expanded statement parsing

Fixes #34543.

This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => {
    println!("") println!("")
    //^ Semicolons are now required on macro-expanded non-braced macro invocations
    //| in statement positions.
    let x = 0
    //^ Semicolons are now required on macro-expanded `let` statements
    //| that are followed by more statements, so this would break.
    let y = 0 //< (this would still be allowed to reduce breakage in the wild)
}
fn main() { m!() }
```

r? @eddyb
2016-07-13 01:37:07 -07:00
Guillaume Gomez
23d5f5652c Rollup merge of #34770 - davidko:patch-1, r=steveklabnik
Fixed some typos

I believe these are typos?
2016-07-12 12:08:24 +02:00
Guillaume Gomez
e2e4b82356 Rollup merge of #34742 - abhijeetbhagat:master, r=steveklabnik
Update on struct expressions

Update doc for struct expressions (#32769)
2016-07-12 12:08:23 +02:00
Jeffrey Seyfried
337236870d Fix fallout. 2016-07-12 04:31:40 +00:00
David
81386cf277 Fixed some typos 2016-07-11 14:43:56 -07:00
abhi
f396cb42ee Update on struct expressions (check #32769) 2016-07-10 02:10:57 +05:30
Manish Goregaokar
88350bdf52 Rollup merge of #34699 - phlogisticfugu:master, r=steveklabnik
enhancewindows documentation in getting-started

- minor pronoun fix We -> You
- PATH troubleshooting
- dir output is vertical (but did not include timestamps)
- executables not in %PATH% require .\

r? @steveklabnik
2016-07-08 14:47:00 +05:30