Commit Graph

3839 Commits

Author SHA1 Message Date
Guillaume Gomez
86e4a034af Rollup merge of #34442 - tatsuya6502:doc-book-ownership, r=steveklabnik
[doc] Fix links in Ownership section of the book

- Add a missing link definition for `[i32]`.
- Like `[stack]` link is pointing to `...#the-stack`, append `#the-heap` to `[heap]` link.
2016-06-28 16:05:14 +02:00
Guillaume Gomez
47ef866f43 Rollup merge of #34328 - wuranbo:patch-1, r=steveklabnik
Traits where syntax's extra usage example more clearly

r? @steveklabnik
2016-06-28 16:05:13 +02:00
Guillaume Gomez
be1c2b9c8c Rollup merge of #34287 - durka:patch-26, r=steveklabnik
update reference for #29734
2016-06-28 16:05:13 +02:00
Guillaume Gomez
cea2438834 Rollup merge of #34080 - royalstream:royalstream-book-june4, r=steveklabnik
Syntax coloring and more compact diagram

Two cosmetic improvements:
- New content was added a few days ago to the **Closures** chapter but it was missing rust's syntax coloring.
- Also, in the **Crates and Modules** chapter, a diagram was improved to be more symmetric and to take less space.
2016-06-28 16:05:12 +02:00
Jeffrey Seyfried
d3ae56d755 Rollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichton
This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors).  This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes.

As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos).  While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.
2016-06-25 22:35:09 +00:00
Tatsuya Kawano
26096c84e3 [doc] Fix links in Ownership section of the book 2016-06-24 08:08:08 +08:00
Jonathan Turner
6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
Alfie John
eb17527039 Switched tense to clarify what is happening in the example 2016-06-23 06:20:29 +10:00
Guillaume Gomez
f39c4930b3 Rollup merge of #34378 - liigo:patch-10, r=Manishearth
diagnostics comes from different places now
2016-06-21 23:54:29 +02:00
Liigo Zhuang
7f4b75e173 diagnostics comes from different places now 2016-06-20 16:05:30 +08:00
Alexander Stocko
e79b672a88 Fixed links in book/compiler-plugins.md 2016-06-19 16:11:43 -04:00
吴冉波
d0a0befb54 Traits where syntax's extra usage example more clearly
r? @steveklabnik
2016-06-17 22:54:06 +08:00
Alex Burka
b54afbee1f include list of characters 2016-06-15 16:42:36 -04:00
Alex Burka
523dbfc312 update reference for #29734 2016-06-15 16:35:03 -04:00
Liigo Zhuang
4dcebd2fa9 reference: link to proper ffi attributes 2016-06-14 10:50:48 +08:00
Florian Berger
4e0fd65d96 doc: Fix typo 2016-06-13 21:35:37 +03:00
bors
5b09f2a1a6 Auto merge of #34238 - jpreiss:master, r=steveklabnik
fix typo in primitive-types section on slices
2016-06-12 00:05:47 -07:00
James Alan Preiss
c0c43b1e27 typo fix in loops.md 2016-06-11 20:46:23 -07:00
James Alan Preiss
77aeb7b6f1 fix typo in primitive-types section on slices 2016-06-11 20:31:01 -07:00
bors
4c45d26a82 Auto merge of #34132 - AtheMathmo:no-stdlib, r=steveklabnik
Note warning of default features on libc

The default features of libc include libstd. This should be noted on this page.
2016-06-11 19:57:47 -07:00
Seo Sanghyeon
b2581974a3 Rollup merge of #34129 - jviide:from-string-box-error, r=steveklabnik
Remove a gotcha from book/error-handling.md

The book's "Error handling with `Box<Error>`" section talks about `Box<Error>`. In the actual example `Box<Error + Send + Sync>` is used instead so that the corresponding From impls could be used to convert a plain string to an error type. Rust 1.7 added support for conversion from `&str`/`String` to
`Box<Error>`, so this gotcha and later references to it can now be removed.

r? @steveklabnik
2016-06-10 21:16:44 +09:00
bors
0740a93cc2 Auto merge of #33895 - AndrewBrinker:master, r=steveklabnik
Rewrote "How Safe and Unsafe Interact" Nomicon chapter.

The previous version of the chapter covered a lot of ground, but was a little meandering and hard to follow at times. This draft is intended to be clearer and more direct, while still providing the same information as the previous version.

r? @steveklabnik
2016-06-09 07:13:34 -07:00
bors
bb4b3fb7f9 Auto merge of #32202 - arielb1:slice-patterns, r=nikomatsakis
Implement RFC495 semantics for slice patterns

non-MIR translation is still not supported for these and will happily ICE.

This is a [breaking-change] for many uses of slice_patterns.

[RFC 495 text](https://github.com/rust-lang/rfcs/blob/master/text/0495-array-pattern-changes.md)
2016-06-08 19:30:33 -07:00
Ariel Ben-Yehuda
5cf4139d21 fix tests 2016-06-09 00:38:38 +03:00
Andrew Brinker
af33b30bc6 Fixed based on feedback from steveklabnik 2016-06-07 18:09:24 -04:00
James Lucas
8844fd4e8a Adding sections and brief explanation of libc
Have included an example of a Cargo.toml file containing the libc dependency.

The file has been reformatted to use sections. The note on the default features warning is part of the _Using libc_ section but is in bold.
2016-06-07 10:59:47 -07:00
Steve Klabnik
a0bf3b8b47 Rollup merge of #34138 - hoodie:bug/bool_colors, r=steveklabnik
Bug/bool colors

This is actually #33661 @steveklabnik, sorry about this, github ate my homework
2016-06-07 10:43:58 -04:00
Steve Klabnik
3ff22ccd40 Rollup merge of #34125 - MichaelNecio:book_addition, r=steveklabnik
Noted that shadowing never destroys a value

Fixes issue #33887

r? @steveklabnik
2016-06-07 10:43:58 -04:00
Steve Klabnik
a41de7f8da Rollup merge of #34099 - markrcote:functions-copyedit, r=steveklabnik
Add missing space before parenthesis.
2016-06-07 10:43:57 -04:00
Steve Klabnik
31ddf966f5 Rollup merge of #34094 - abenga:doc_changes_variable_bindings, r=steveklabnik
Minor changes to variable bindings chapter

* In "*... name as another binding, that's currently in scope, will ...*", *"
  that's currently in scope"* is not a parenthetical element, and the commas
  can be omitted.

* Other minor changes.
2016-06-07 10:43:57 -04:00
Steve Klabnik
46de8f750b Rollup merge of #34070 - chriskrycho:update-reference-deprecated-attribute, r=steveklabnik
Update reference to indicate stabilization of `deprecated` attribute.

None
2016-06-07 10:43:57 -04:00
Steve Klabnik
ee78a02aec Rollup merge of #34060 - JDemler:master, r=steveklabnik
Improved documentation for tests/ directory

This ambigouity problem was already discussed in the [forums](https://users.rust-lang.org/t/problem-using-external-modules-inside-integration-test-submodule/5312/6).
2016-06-07 10:43:56 -04:00
Horace Abenga
b014039197 Minor changes to variable bindings chapter
* In "... name as another binding, that's currently in scope, will ...", ",
  that's currently in scope, " is not a parenthetical element, and the commas
  can be omitted.

* Other minor changes.
2016-06-07 09:38:15 +03:00
James Lucas
299a1a0699 Note warning of default features on libc
The default features of libc include libstd. This should be noted on this page.
2016-06-06 23:09:55 -07:00
Joachim Viide
75fc40c668 Remove a gotcha from book/error-handling.md
The book's "Error handling with Box<Error>" section talks about Box<Error>.
In the actual example Box<Error + Send + Sync> is used instead so that the
corresponding From impls could be used to convert a plain string to an error
type. Rust 1.7 added support for conversion from &str/String to
Box<Error>, so this gotcha and later references to it can now be removed.
2016-06-07 02:48:20 +03:00
Michael Necio
f07aa35549 Noted that shadowing never destroys a value 2016-06-06 18:13:20 -04:00
Mark Côté
fb0d9acf36 Add missing space before parenthesis. 2016-06-05 14:41:42 -04:00
Chris Krycho
2745d3e3d2 Update reference to indicate stabilization of deprecated attribute. 2016-06-05 11:52:47 -04:00
Steven Burns
e9f6c0f83a Book: diagram takes less space and it's more symmetric. 2016-06-04 14:04:17 -06:00
Steven Burns
b1605fe8f7 Book: fixed syntax coloring 2016-06-04 14:03:34 -06:00
bors
c81c75076c Auto merge of #33803 - WiSaGaN:feature/rename-main-thread, r=alexcrichton
Rename main thread from "<main>" to "main".

Fix issue #33789

We may need to discuss whether this counts as a breaking change since code may check the main thread name against "\<main\>". Discussion is in #33789
2016-06-03 19:36:32 -07:00
Jakob Demler
c26703b77b document of shared modules for integration tests 2016-06-03 12:16:07 +02:00
Jakob Demler
d71f9f614c Fixed ambiguous explanaiton of tests/ directory 2016-06-03 11:43:42 +02:00
Guillaume Gomez
2c1da5b650 Rollup merge of #34021 - ollie27:book_links_offline, r=steveklabnik
Fix a few links in the book

Links to directories and direct links to doc.rust-lang.org don't work properly
when viewing the docs offline so fix them.

r? @steveklabnik
2016-06-02 13:47:08 +02:00
Andrew Brinker
00e77d7489 Rewrote "How Safe and Unsafe Interact" Nomicon chapter.
The previous version of the chapter covered a lot of ground, but was a little
meandering and hard to follow at times. This draft is intended to be clearer
and more direct, while still providing the same information as the previous
version.
2016-06-01 16:13:44 -04:00
Oliver Middleton
658253d30c Fix a few links in the book
Links to directories and direct links to doc.rust-lang.org don't work properly
when viewing the docs offline so fix them.
2016-06-01 16:53:14 +01:00
Manish Goregaokar
b0e88279c7 Rollup merge of #33385 - cheercroaker:doc-correction, r=brson
Mention initial year of publication only for the documentation copyright

I have corrected the "copyright expiration year" that was still 2015 in the documentation copyright notice.

According to #31007 it seems that we could go one step further and simplify the copyright notice to only mention the year of original publication ("Copyright &copy; 2011" in this case).

Let me know if you would prefer this copyright notice to only mention the year of original publication (please make sure that it is really 2011 as stated in the current version of the documentation, and not 2010 like Rust's code) and I'll make the simplification.
2016-06-01 12:57:40 +05:30
Vadim Petrochenkov
d69aeaf662 Implement .. in tuple (struct) patterns 2016-05-26 11:11:58 +03:00
cheercroaker
c4ed094ef2 Mention initial copyright year only
As stated in #31007 the copyright notice should reflect the year of original publication, thus avoiding useless updates every year.
2016-05-24 21:52:32 +02:00
Guillaume Gomez
46138352e6 Rollup merge of #33810 - tmr232:patch-1, r=Manishearth
Fixed link in Rust Book (no-stdlib)

Closes #33806
2016-05-24 12:58:19 +02:00