Commit Graph

3081 Commits

Author SHA1 Message Date
Steve Klabnik
36190ef91d Rollup merge of #28466 - baskerville:trpl-heap-highest-addr, r=steveklabnik
r? @steveklabnik
2015-09-17 17:06:55 -04:00
Steve Klabnik
cc664f1f44 Rollup merge of #28451 - dagnir:osx-req-wording, r=steveklabnik
Using "later" in this context makes more sense than "greater" so it's been changed to match the Linux requirement above it rather than the other way around.
2015-09-17 17:06:55 -04:00
Steve Klabnik
40c45ac86a Rollup merge of #28422 - christopherdumas:label_code, r=steveklabnik 2015-09-17 17:06:54 -04:00
Steve Klabnik
54063e330a Rollup merge of #28276 - jackwilsonv:patch-5, r=Manishearth 2015-09-17 17:06:54 -04:00
Tshepang Lekhonkhobe
a3305f87c1 reference: actual keywords feel more appropriate 2015-09-17 22:55:40 +02:00
Tshepang Lekhonkhobe
22fc5f480d reference: mark that up to make it more clear it is a keyword 2015-09-17 22:52:39 +02:00
Tshepang Lekhonkhobe
553a2f1ead doc: follow idiom in code snippet 2015-09-17 22:13:05 +02:00
Bastien Dejean
6d2cb6c688 trpl: Fix off-by-one highest memory address 2015-09-17 18:53:01 +02:00
Dongie Agnir
dfe88c09b8 Change OSX version req wording to match Linux. 2015-09-16 18:56:56 -04:00
christopherdumas
e66a1dcde9 Fixe heading 2015-09-15 10:37:52 -07:00
christopherdumas
0b7e048378 Fix option link and anchor links. 2015-09-15 10:37:02 -07:00
christopherdumas
b69a51164d Added anchors for the code snippets. 2015-09-15 10:34:57 -07:00
christopherdumas
320880eed5 Fix option link and anchor links. 2015-09-15 10:34:57 -07:00
Aidan Hobson Sayers
1a6bdba05e Update musl build in light of llvm 3.7 release 2015-09-13 14:57:54 +01:00
bors
4d20369998 Auto merge of #28371 - killercup:docs/trpl-markup-fixes, r=steveklabnik
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC

r? @steveklabnik
2015-09-12 16:31:10 +00:00
Pascal Hertleif
4828c88af6 Nomicon: Fix Links
The style `[name][]` does not work with Pandoc, whereas `[name]` does.
I hope hoedown accepts this as well.
2015-09-12 12:13:24 +02:00
Pascal Hertleif
39f97cfcf8 TRPL: Fix Headlines, Links in "Error Handling"
- Headlines begin at 1st level now like the rest of the book
- All Headlines a blank line above and below
- Fix links in this chapter's TOC
2015-09-12 12:09:59 +02:00
bors
c8ded9a14f Auto merge of #28306 - alexcrichton:less-rt, r=brson
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
2015-09-11 19:42:19 +00:00
Alex Crichton
f4be2026df std: Internalize almost all of std::rt
This commit does some refactoring to make almost all of the `std::rt` private.
Specifically, the following items are no longer part of its API:

* DEFAULT_ERROR_CODE
* backtrace
* unwind
* args
* at_exit
* cleanup
* heap (this is just alloc::heap)
* min_stack
* util

The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is
an entry point for the `panic!` macro via the `begin_unwind` and
`begin_unwind_fmt` reexports.
2015-09-11 11:19:20 -07:00
bors
eda85fede0 Auto merge of #28348 - petrochenkov:novirt, r=alexcrichton
Noticed these yesterday while reading libsyntax
2015-09-11 17:58:59 +00:00
Vadim Petrochenkov
9f1f4c16aa Remove some remains of virtual structs from the parser 2015-09-11 10:09:22 +03:00
bors
01024c9f61 Auto merge of #28328 - tshepang:unusual, r=brson 2015-09-11 06:28:17 +00:00
bors
98eeded587 Auto merge of #28301 - christopherdumas:intergrate_error_burnstushi, r=steveklabnik
This was @steveklabnik's idea. Thanks @BurntSushi for the awesome blog post!
r? @steveklabnik
2015-09-10 20:03:30 +00:00
christopherdumas
e18122682b Adapted @BurtSushi's blog post for the error handling chapter, rewrite the case study. 2015-09-10 09:48:04 -07:00
bors
9577e42682 Auto merge of #28329 - tshepang:comfort, r=steveklabnik 2015-09-10 13:44:48 +00:00
bors
5f9f0b7cc3 Auto merge of #28266 - jackwilsonv:patch-4, r=steveklabnik
r? @steveklabnik
2015-09-10 07:39:50 +00:00
Tshepang Lekhonkhobe
c5a76c692b reference: not comfortable seeing a paragraph starting with a lowercase letter 2015-09-10 06:03:32 +02:00
bors
e3fd444dc9 Auto merge of #28323 - tshepang:idiom, r=steveklabnik 2015-09-10 03:48:30 +00:00
Tshepang Lekhonkhobe
dc6c11816c reference: using periods here is unusual 2015-09-10 05:48:08 +02:00
bors
c48b8f17a0 Auto merge of #28232 - brson:tprl, r=steveklabnik
r? @steveklabnik 

The phrase 'academic research' rubs me the wrong way. I have some concern about the role of this page and think it could be expanded to more than just academic papers and cleaned up a lot.
2015-09-10 00:37:55 +00:00
bors
3cda3c96e3 Auto merge of #28250 - durka:patch-7, r=steveklabnik
I took a stab at fixing #28064. Not sure if this all-features-in-one-example approach is the right one. Also I completely made up the terms "star globbing" and "brace expansion globbing" -- they are just called "glob-like syntax" in the reference.
2015-09-09 22:41:23 +00:00
Tshepang Lekhonkhobe
3860f974a7 reference: format code snippets in an idiomatic manner 2015-09-09 22:35:49 +02:00
bors
5d9dc1d7a1 Auto merge of #28313 - rutsky:patch-4, r=alexcrichton
Follow-up fix for PR #28283.
2015-09-09 16:44:43 +00:00
Manish Goregaokar
ee00780b98 Rollup merge of #28295 - steveklabnik:language_fix, r=alexcrichton
Thanks Eric, reported via email
2015-09-09 18:36:11 +05:30
Manish Goregaokar
b33b121e95 Rollup merge of #28294 - midinastasurazz:patch-3, r=steveklabnik
The link address is defined below the paragraph so no need to have it inline.
2015-09-09 18:36:11 +05:30
Manish Goregaokar
4fc09d3a15 Rollup merge of #28283 - rutsky:patch-3, r=steveklabnik
r? @steveklabnik
2015-09-09 18:36:11 +05:30
Manish Goregaokar
eb2e00a0fd Rollup merge of #28281 - rutsky:patch-2, r=steveklabnik
r? @steveklabnik
2015-09-09 18:36:10 +05:30
Vladimir Rutsky
a1758aea18 fix capitalization inside sentense 2015-09-09 12:54:31 +03:00
Steve Klabnik
ca1a81df23 Fix small sentence about references
Thanks Eric, reported via email
2015-09-08 09:33:53 -04:00
midinastasurazz
3e8038bcab Fix link to hygienic macros on Wikipedia 2015-09-08 14:06:35 +02:00
Vladimir Rutsky
b5b94037c4 fix punctuation in list (again) 2015-09-07 11:03:53 +03:00
Vladimir Rutsky
b1e8007999 fix capitalization inside sentense 2015-09-07 11:01:01 +03:00
Vladimir Rutsky
0d5cae2d45 fix punctuation in list
r? @steveklabnik
2015-09-07 09:41:02 +03:00
Jack Wilson
5c5cca58f7 Small syntax and formatting changes 2015-09-06 16:23:44 -07:00
Hunan Rostomyan
b4afa8e2e5 Fix a typo 2015-09-06 14:38:12 -07:00
bors
01b9cc58ba Auto merge of #28269 - petrochenkov:docorder, r=steveklabnik
This is what I was talking about in https://github.com/rust-lang/rust/pull/26462#issuecomment-113883744

r? @steveklabnik
2015-09-06 19:43:06 +00:00
bors
a269e31a30 Auto merge of #28265 - boblehest:master, r=bluss
In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().

https://doc.rust-lang.org/nightly/nomicon/vec-drain.html

```rust
pub fn drain(&mut self) -> Drain<T> {
    // Oops, setting it to 0 while we still need the old value!
    self.len = 0;

    unsafe {
        Drain {
            // len is used to create a &[T] from &self here,
            // so we end up always creating an empty slice.
            iter: RawValIter::new(&self),
            vec: PhantomData,
        }
    }
}
```

A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly

And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly
2015-09-06 17:55:04 +00:00
Jørn Lode
97dd25094c Rustonomicon: Reword potentially confusing comment in Vec::drain. 2015-09-06 18:21:57 +02:00
Vadim Petrochenkov
c34f350664 Further tweaks to doc/index.md 2015-09-06 16:07:55 +03:00
Vadim Petrochenkov
201bfbe55e Reorder sections in doc/index.md 2015-09-06 15:25:01 +03:00
Jack Wilson
3ccc253dae Small formatting/syntax tweaks 2015-09-05 19:54:52 -07:00
Jørn Lode
c08deef982 Rustonomicon: Fix bug in implementation of Vec::drain()
In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().

https://doc.rust-lang.org/nightly/nomicon/vec-drain.html

```rust
pub fn drain(&mut self) -> Drain<T> {
    // Oops, setting it to 0 while we still need the old value!
    self.len = 0;

    unsafe {
        Drain {
            // len is used to create a &[T] from &self here,
            // so we end up always creating an empty slice.
            iter: RawValIter::new(&self),
            vec: PhantomData,
        }
    }
}
```

A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly

And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly
2015-09-06 03:44:13 +02:00
bors
f84d53ca0a Auto merge of #28259 - christopherdumas:fix_empty_link, r=Manishearth 2015-09-06 01:01:38 +00:00
Alex Burka
a506b7c532 mention dash-to-underscore behavior 2015-09-05 16:42:46 -04:00
christopherdumas
3fa1ee4677 Added link for hygenic macro system in macros.md 2015-09-05 06:04:15 -07:00
Manish Goregaokar
3610c731f3 Rollup merge of #28225 - jackwilsonv:patch-3, r=steveklabnik
r? @steveklabnik
2015-09-05 16:16:01 +05:30
Alex Burka
2cebf3666a document advance extern crate/use syntax
I took a stab at fixing #28064. Not sure if this all-features-in-one-example approach is the right one. Also I completely made up the terms "star globbing" and "brace expansion globbing" -- they are just called "glob-like syntax" in the reference.
2015-09-05 03:08:53 +00:00
Brian Anderson
2218b594bc trpl: Rename 'academic research' to 'bibliography'. Add some new links. 2015-09-04 09:37:15 -07:00
Jack Wilson
f44fbf08f9 Capitalize circle reference 2015-09-03 20:51:08 -07:00
Jack Wilson
2548e2ee58 Fixes minor formatting inconsistencies 2015-09-03 20:48:26 -07:00
Steve Klabnik
6c9549dd20 Rollup merge of #28216 - christopherdumas:fix_28196, r=steveklabnik
This is a docs change suggested in #28196.
r? @steveklabnik
2015-09-03 20:10:10 -04:00
Steve Klabnik
79ea0eed5b Rollup merge of #28215 - matklad:grammar-extern-block-item, r=steveklabnik
extern_block should be extern_block_item.

extern_block_item is `extern { bunch of fns }`, extern_block is just `bunch of fns`

r? @steveklabnik
2015-09-03 20:10:09 -04:00
Steve Klabnik
fd10ded4ea Rollup merge of #28214 - tshepang:word-not-name, r=steveklabnik
Also, add missing comma
2015-09-03 20:10:09 -04:00
Steve Klabnik
ce20719717 Rollup merge of #28213 - tshepang:replace-comma, r=steveklabnik 2015-09-03 20:10:09 -04:00
Steve Klabnik
5b8241cea9 Rollup merge of #28212 - tshepang:rust-is-a-language, r=steveklabnik 2015-09-03 20:10:09 -04:00
Steve Klabnik
e903d9c9b9 Rollup merge of #28210 - tshepang:typo, r=steveklabnik 2015-09-03 20:10:08 -04:00
Steve Klabnik
ff7f5cd0c6 Rollup merge of #28208 - matklad:grammar-whitespace-cleanup, r=steveklabnik 2015-09-03 20:10:08 -04:00
Steve Klabnik
a10e87648f Rollup merge of #28207 - tshepang:flow, r=steveklabnik 2015-09-03 20:10:08 -04:00
Steve Klabnik
54279e0ced Rollup merge of #28205 - matklad:grammar-remove-proc, r=alexcrichton
As I understand, there are no proc closures in Rust any more. So this pr removes `procedure_type` production. It isn't used anywhere. The `proc` is still a keyword.

r? @steveklabnik
@bors: r+ rollup
2015-09-03 20:10:07 -04:00
Steve Klabnik
35019737cc Rollup merge of #28204 - matklad:grammar-duplicate-else-tail, r=steveklabnik
The rule `else_tail` was duplicated in `if` and `if_let` sections. I guess that this is a mistake.

r? @steveklabnik
2015-09-03 20:10:07 -04:00
Steve Klabnik
723ebc2471 Rollup merge of #28203 - benschulz:book-deref-coercion, r=brson
I have two issues with the section "Deref and method calls" of the book's chapter "Deref coercions".

 - (Minor) It says "In other words, these are the same two things in Rust:", followed by a code block in which no two things seem similar, much less the same. Presumably this sentence made more sense in a previous revision.

 - The next paragraph conflates two concepts which, imho, should kept separate. They are
    - deref coercion, i.e. inserting as many `*` as necessary and
    - implicitly referencing the receiver, i.e. inserting a single `&` to satisfy the method's `self` parameter type.

I appreciate that with the proposed changes the example becomes very contrived, even for a foo-bar-baz one. However, the current exmplanation is just wrong.
2015-09-03 20:10:07 -04:00
Steve Klabnik
b96618e18b Rollup merge of #28202 - matklad:grammar-loop-labels, r=steveklabnik
This adds missing `?` marks to productions for loops and break/continue.

It also adds missing option label to while let loop.


Note that '[' foo ']' means grouping in BNF, and '?' is used for possible missing items.

r? @steveklabnik
2015-09-03 20:10:07 -04:00
christopherdumas
17fde3a34d Removed incorrect reference from #28196 2015-09-03 14:39:34 -07:00
Aleksey Kladov
73a6199248 reference grammar: fix item definition
extern_block should extern_block_item
2015-09-04 00:29:47 +03:00
Aleksey Kladov
f7d5c25b3d reference grammar: whitespace cleanup 2015-09-03 23:42:33 +03:00
Tshepang Lekhonkhobe
6cdba4f766 book: it is RwLock, not RWLock 2015-09-03 22:14:28 +02:00
Manish Goregaokar
67616f7191 Rollup merge of #28186 - thomas07vt:thomas07vt-patch-trpl-rust-inside-other-languages.md, r=steveklabnik
The embed rust file that we compile prints out 'Thread finished..' messages along with a 'done!' r? @steveklabnik
2015-09-04 01:40:02 +05:30
Manish Goregaokar
0c2924386d Rollup merge of #28184 - xiaochuanyu:patch-1, r=alexcrichton
Originally in an example it reads as follows:
```rust
fn inverse<T>() -> T
        // this is using ConvertTo as if it were "ConvertFrom<i32>"
         where i32: ConvertTo<T> {
     42.convert()
 }
```
There was no mention of `ConvertFrom` elsewhere in the page other than in this comment. Is this supposed to be `ConvertTo<i64>` ?
I'm confused by this example.
2015-09-04 01:40:01 +05:30
Tshepang Lekhonkhobe
23956ae1f4 book: improve flow 2015-09-03 21:54:00 +02:00
Tshepang Lekhonkhobe
197cec6ed9 book: Rust is a language, so no need to mention that fact here 2015-09-03 21:40:19 +02:00
Aleksey Kladov
59f2343bdb reference grammar: remove procedure_type 2015-09-03 22:25:47 +03:00
Aleksey Kladov
000fe00726 reference grammar: remove duplicate else_tail rule 2015-09-03 22:19:56 +03:00
benshu
986f523b89 Take method invocation semantics out of chapter on deref coercion. 2015-09-03 21:17:59 +02:00
Tshepang Lekhonkhobe
3525a13fea book: "word" feels more suitable than "name"
Also, add missing comma
2015-09-03 21:14:03 +02:00
Aleksey Kladov
83aee74fce reference grammar: loop label should be optional
This adds missing `?` marks to productions for loops and break/continue.

It also adds missing option label to while let loop
2015-09-03 22:13:50 +03:00
Tshepang Lekhonkhobe
8b2b949830 book: replace comma with a more suitable character 2015-09-03 21:11:44 +02:00
Tshepang Lekhonkhobe
f6f31dd143 book: improve paragraph on stack de-allocation 2015-09-03 21:10:48 +02:00
John Thomas
6fcdead4ee Bash output fix to match real 'ruby embed.rb' call
The embed rust file that we compile prints out 'Thread finished..' messages along with a 'done!'
2015-09-02 23:13:56 -07:00
Xiao Chuan Yu
865d6c3b5b Fix mistake in trait.md 2015-09-03 01:36:22 -04:00
Jack Wilson
28bf68f3fe Makes formatting of struct keyword consistent 2015-09-02 18:58:18 -07:00
bors
cfd76b364c Auto merge of #28135 - jackwilsonv:patch-1, r=steveklabnik
Small formatting change

r? @steveklabnik
2015-09-02 19:08:18 +00:00
bors
cb40b8a2ab Auto merge of #28155 - vchimishuk:doc-rust-inside-other-languages-tab, r=alexcrichton
Fixed x variable identation. How it was displayed in Firefox before: http://s16.postimg.org/c9448tn0k/Screenshot_from_2015_09_01_17_35_43.jpg
2015-09-02 04:55:37 +00:00
bors
e758946f96 Auto merge of #28149 - jakerr:atomic, r=alexcrichton
Makes the code agree with the comment: 'value answers "am I locked?"'.
2015-09-02 03:13:43 +00:00
Viacheslav Chimishuk
5ae8a0d38f Source code style fixed: tab replaced with whitespaces. 2015-09-01 17:49:08 +03:00
Jake Kerr
8213f01a76 Reverse AtomicBool value in nomicon example to agree with its comment.
Makes the code agree with the comment: 'value answers "am I locked?"'.
2015-09-01 17:32:22 +09:00
Jack Wilson
7665a7f016 Makes formatting of i32 consistent 2015-08-31 15:52:02 -07:00
AlexDenisov
b03b0d4c10 Fix typo 2015-08-31 06:44:27 +02:00
bors
477561de4e Auto merge of #28078 - apasel422:patch-1, r=alexcrichton 2015-08-29 04:58:45 +00:00
bors
e9111e6a0e Auto merge of #28070 - mdchoate:patch-1, r=alexcrichton 2015-08-29 03:20:37 +00:00
Andrew Paseltiner
010b7f3621 Remove superfluous line from Nomicon 2015-08-28 22:07:02 -04:00
Michael Choate
645d7ae739 Fix typo in loops.md 2015-08-28 14:34:15 -04:00
Steve Klabnik
1c44722375 Be explicit about using crates.io's libc crate
Fixes #28053
2015-08-28 11:43:23 -04:00
Manish Goregaokar
ab3dc54bcf Rollup merge of #28022 - steveklabnik:gh27936, r=alexcrichton
Fixes #27936
2015-08-28 03:38:37 +05:30
Steve Klabnik
af58e5cfea Add Windows-specific comments to testing guide
Fixes #27936
2015-08-27 13:43:43 -04:00
Nikolay Kondratyev
424d9c2778 Fix docs typo 2015-08-26 05:06:00 +05:00
Matt Brubeck
93616af42f Document the recursion_limit crate attribute 2015-08-25 10:02:58 -07:00
Steve Klabnik
d9de182fa5 Rollup merge of #27982 - frewsxcv:patch-25, r=steveklabnik 2015-08-25 09:43:07 -04:00
Steve Klabnik
c15d0cf270 Rollup merge of #27978 - mgrabovsky:doc-fix, r=steveklabnik 2015-08-25 09:43:07 -04:00
Adam Crume
574deb73ba book: Mention that --ignored is a test binary argument 2015-08-24 21:53:02 -07:00
Adam Crume
f56a478377 book: Fix spacing in testing section 2015-08-24 21:52:33 -07:00
Corey Farwell
1629dce494 Use correct indefinite article in reference.md 2015-08-24 17:26:26 -04:00
Matěj Grabovský
82bed0a760 Clarify a sentence in the Book 2015-08-24 20:14:39 +02:00
Adam Crume
30fc4b765c book: Talk about ignore attribute in testing guide 2015-08-23 13:53:52 -07:00
bors
d530379df6 Auto merge of #27922 - tshepang:dst-definition, r=alexcrichton
I am not sure this would work... I didn't test.
2015-08-23 06:06:52 +00:00
Steve Klabnik
17c1d0ce04 Rollup merge of #27935 - mbrubeck:cfg-test, r=steveklabnik
r? @steveklabnik
2015-08-22 19:15:44 -04:00
Steve Klabnik
1b130326b0 Rollup merge of #27934 - MatejLach:spacing_fix, r=steveklabnik
r @steveklabnik ?
2015-08-22 19:15:44 -04:00
Steve Klabnik
fb58dcdbd2 Rollup merge of #27926 - durka:emphasize-no-bin-doctest, r=steveklabnik
It came up twice in quick succession on IRC that rustdoc doesn't run tests in bin crates, and doesn't give any explanation/warning either as to why. I thought it couldn't hurt to emphasize that in the Book.
2015-08-22 19:15:43 -04:00
Steve Klabnik
3677a1feca Rollup merge of #27924 - pornel:bookthreadjoin, r=steveklabnik
The chapter on concurrency has two examples that both start with:

     let something = thread::spawn(…

but the returned values have different types, because the second example has `.join()` at the end of the expression.

I haven't noticed that join at first, and was wondering how is that possible that the result can have `.is_err()` and `.join()` methods.

I've changed the second example to have the same structure as the first, so they're easy to compare.
2015-08-22 19:15:43 -04:00
Steve Klabnik
b3e9615ed4 Rollup merge of #27921 - tshepang:missing-words, r=steveklabnik 2015-08-22 19:15:43 -04:00
Matt Brubeck
59b69d4ae7 Include cfg(test) in the reference 2015-08-21 09:54:58 -07:00
Matej Ľach
bbe10c5c4f fix spacing issue in trpl/documentation doc 2015-08-21 17:10:46 +01:00
Alex Burka
8e6b9b8e93 emphasize that doctests don't run in bin crates 2015-08-20 18:41:24 -04:00
Kornel Lesiński
d112274fcb Use handle the same way in similarly structured examples 2015-08-20 22:12:41 +01:00
Tshepang Lekhonkhobe
9ea001d8e9 book: add DST to glossary 2015-08-20 22:05:39 +02:00
Tshepang Lekhonkhobe
71d654a641 nomicon: insert missing words 2015-08-20 21:37:12 +02:00
Tshepang Lekhonkhobe
a274a64669 nomicon: use current syntax 2015-08-20 21:17:20 +02:00
Steve Klabnik
945603c85b Rollup merge of #27883 - steveklabnik:gh27587, r=alexcrichton
Fixes #27587
2015-08-18 15:03:11 -04:00
Steve Klabnik
572526be27 Rollup merge of #27882 - steveklabnik:gh27428, r=alexcrichton
This is where panic!() is introduced.
2015-08-18 15:03:11 -04:00
Steve Klabnik
288edec968 add cfg(target_env) to the reference
Fixes #27587
2015-08-18 14:24:25 -04:00
Steve Klabnik
dbbcb434b1 Add note about backtraces to TRPL
This is where panic!() is introduced.

Fixes #27428
2015-08-18 14:22:18 -04:00
bors
dc9b74f38d Auto merge of #27536 - steveklabnik:doc_object_safety, r=alexcrichton
Fixes #26938
2015-08-18 16:28:13 +00:00
Steve Klabnik
ce1bdc7293 Add object safety to TRPL
Fixes #26938
2015-08-18 11:27:02 -04:00
Steve Klabnik
e4266803cb Fix broken link to Wilson
reported by @chris-code here: https://github.com/rust-lang/rust/issues/24486#issuecomment-130812460
2015-08-13 15:42:14 -04:00
bors
b2aef9d58b Auto merge of #27789 - chriskrycho:remove_pandoc_references, r=steveklabnik
Per @steveklabnik's comment [here](https://github.com/rust-lang/cargo/issues/739#issuecomment-130085860), the Pandoc components of the Makefile are no longer used, and as such the corresponding components of the documentation are out of date.

  - I've removed the Pandoc (and therefore also LaTeX) elements of the makefile and confirmed that the build proceeds correctly.
  - I updated the documentation to reference `rustdoc` and  of Pandoc.

r? @steveklabnik
2015-08-13 03:52:10 +00:00
Chris Krycho
75f7a68ffa doc/readme: replace references to Pandoc with rustdoc. 2015-08-12 22:29:05 -04:00
Alex Crichton
fe3ab21054 rollup merge of #27682: neurons/np.27681
PR for [Issue #27681] (https://github.com/rust-lang/rust/issues/27681). A simple update to the latest version of rust when typing the command rustc --version.
2015-08-11 22:42:22 -07:00
Alex Crichton
1757837228 rollup merge of #27659: goyox86/goyox86/update-spanish-book-link
This PR just updates the link of my translation of the book to the final rendered version of it.

/cc @steveklabnik
2015-08-11 22:42:20 -07:00
Alex Crichton
737397c584 rollup merge of #27622: eefriedman/https-url
Also fixes a few outdated links.
2015-08-11 22:11:25 -07:00
Niranjan Padmanabhan
d73d22b8cc Update version number response for new version of rust 2015-08-11 18:45:53 -07:00
Manish Goregaokar
a917f61569 Rollup merge of #27611 - vincentbernat:fix/doc/chars-iterator, r=steveklabnik
The previous wording was confusing. While would we need to go through
the whole list just to find the first code point? `chars()` being an
iterator, we only need to walk from the beginning of the list.

Note that I am not a native English speaker and I have still difficulties to spot if a "the" is needed somewhere. Feel free to take this PR as a mere suggestion.

r? @steveklabnik
2015-08-11 16:48:02 +05:30
Manish Goregaokar
e40516bcb4 Rollup merge of #27542 - steveklabnik:gh27303, r=alexcrichton
Fixes #27303
2015-08-11 16:48:01 +05:30
Jose Narvaez
b7a88d8702 Updated the link with rendered version of the Spanish trpl translation. 2015-08-11 11:02:38 +01:00
Alex Crichton
18607149fb syntax: Add a new unstable #[linked_from] attribute
To correctly reexport statically included libraries from a DLL on Windows, the
compiler will soon need to have knowledge about what symbols are statically
included and which are not. To solve this problem a new unstable
`#[linked_from]` attribute is being added and recognized on `extern` blocks to
indicate which native library the symbols are coming from.

The compiler then keeps track of what the set of FFI symbols are that are
included statically. This information will be used in a future commit to
configure how we invoke the linker on Windows.
2015-08-10 18:20:00 -07:00
bors
5aca49c693 Auto merge of #27338 - alexcrichton:remove-morestack, r=brson
This commit removes all morestack support from the compiler which entails:

* Segmented stacks are no longer emitted in codegen.
* We no longer build or distribute libmorestack.a
* The `stack_exhausted` lang item is no longer required

The only current use of the segmented stack support in LLVM is to detect stack
overflow. This is no longer really required, however, because we already have
guard pages for all threads and registered signal handlers watching for a
segfault on those pages (to print out a stack overflow message). Additionally,
major platforms (aka Windows) already don't use morestack.

This means that Rust is by default less likely to catch stack overflows because
if a function takes up more than one page of stack space it won't hit the guard
page. This is what the purpose of morestack was (to catch this case), but it's
better served with stack probes which have more cross platform support and no
runtime support necessary. Until LLVM supports this for all platform it looks
like morestack isn't really buying us much.

cc #16012 (still need stack probes)
Closes #26458 (a drive-by fix to help diagnostics on stack overflow)

r? @brson
2015-08-10 23:40:54 +00:00
Alex Crichton
7a3fdfbf67 Remove morestack support
This commit removes all morestack support from the compiler which entails:

* Segmented stacks are no longer emitted in codegen.
* We no longer build or distribute libmorestack.a
* The `stack_exhausted` lang item is no longer required

The only current use of the segmented stack support in LLVM is to detect stack
overflow. This is no longer really required, however, because we already have
guard pages for all threads and registered signal handlers watching for a
segfault on those pages (to print out a stack overflow message). Additionally,
major platforms (aka Windows) already don't use morestack.

This means that Rust is by default less likely to catch stack overflows because
if a function takes up more than one page of stack space it won't hit the guard
page. This is what the purpose of morestack was (to catch this case), but it's
better served with stack probes which have more cross platform support and no
runtime support necessary. Until LLVM supports this for all platform it looks
like morestack isn't really buying us much.

cc #16012 (still need stack probes)
Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-08-10 16:35:44 -07:00
Eli Friedman
7d3c4bd72a Tweak style guide to avoid referencing the removed ascii::Ascii. 2015-08-09 18:56:48 -07:00
Eli Friedman
bbbfed2f93 Use https URLs to refer to rust-lang.org where appropriate.
Also fixes a few outdated links.
2015-08-09 14:28:46 -07:00
Vincent Bernat
b67adbed5a TRPL: minor correction on how chars().nth() work
The previous wording was confusing. While would we need to go through
the whole list just to find the first code point? `chars()` being an
iterator, we only need to walk from the beginning of the list.
2015-08-09 00:56:38 +02:00
Mike Marcacci
bcf3921a2a Added arrows to references in tables
Keeping integer values and integer references in the "value" columns made the examples quite difficult for me to follow. I've added unicode arrows to make references more obvious, without using a character with actual meaning in the rust language (like `&` or previously `~`).
2015-08-07 23:13:08 -07:00
bors
9bba711063 Auto merge of #27576 - rust-lang:steveklabnik-patch-1, r=Gankro
1. this isn't actually true about diabetes
2. people with diabetes will get *real sad* when reading this
3. it isn't actually necessary.

r? @Gankro
2015-08-07 05:57:24 +00:00