bors
78ce46ffdd
Auto merge of #28612 - gandro:targetvendor, r=alexcrichton
...
This adds a new target property, `target_vendor`. It is to be be used as a matcher for conditional compilation. The vendor is part of the [autoconf target triple](http://llvm.org/docs/doxygen/html/classllvm_1_1Triple.html#details ): `<arch><sub>-<vendor>-<os>-<env>`. `arch`, `target_os` and `target_env` are already supported by Rust.
This change was suggested in PR #28593 . It enables conditional compilation based on the vendor. This is needed for the rumprun target, which needs to match against both, target_os and target_vendor.
The default value for `target_vendor` is "unknown", "apple" and "pc" are other common values.
Matching against the `target_vendor` is introduced behind the feature gate `#![feature(cfg_target_vendor)]`.
This is the first time I messed around with rustc internals. I just added the my code where I found the existing `target_*` variables, hopefully I haven't missed anything. Please review with care. :)
r? @alexcrichton
2015-09-26 00:14:39 +00:00
Steve Klabnik
f4dc6c785c
Rollup merge of #28655 - alfiedotwtf:patch-2, r=sanxiyn
2015-09-25 13:33:33 -06:00
Steve Klabnik
aed73e0122
Rollup merge of #28588 - critiqjo:trpl-closure, r=steveklabnik
...
r? @steveklabnik
2015-09-25 13:33:31 -06:00
Alfie John
29048c3a80
Keep examples consistent
2015-09-25 12:02:21 +00:00
critiqjo
09d4deef5b
trpl: Refactor returning closures section
2015-09-25 00:17:54 +05:30
Steve Klabnik
c3ca182082
Rollup merge of #28622 - tshepang:known-as-structs, r=steveklabnik
2015-09-24 10:26:37 -06:00
Steve Klabnik
e314ac601a
Rollup merge of #28620 - tshepang:not-filled, r=steveklabnik
2015-09-24 10:26:37 -06:00
Steve Klabnik
c104ba3755
Rollup merge of #28619 - tshepang:fix-link, r=steveklabnik
2015-09-24 10:26:37 -06:00
Steve Klabnik
668ffb1dd8
Rollup merge of #28618 - tshepang:repetition, r=steveklabnik
2015-09-24 10:26:36 -06:00
Steve Klabnik
c16b0f7060
Rollup merge of #28617 - tshepang:optional, r=steveklabnik
2015-09-24 10:26:36 -06:00
Tshepang Lekhonkhobe
0b13ee0ced
reference: rename "structure" to the more familiar "struct"
2015-09-24 08:42:39 +02:00
Tshepang Lekhonkhobe
f34eafdcf9
reference: follow idiom in code snippet
2015-09-24 08:25:43 +02:00
Tshepang Lekhonkhobe
996bd9d0d6
reference: 3 of the 4 things mentioned here are optional
2015-09-24 08:22:58 +02:00
Tshepang Lekhonkhobe
7077075372
doc: "familiarity" does not need to be repeated here
2015-09-24 08:04:55 +02:00
Tshepang Lekhonkhobe
e0f35da9c1
reference: fix anchor link
2015-09-24 07:55:59 +02:00
Tshepang Lekhonkhobe
5f73037b8a
reference: not sure this is the right place to discuss design
2015-09-24 07:50:44 +02:00
Tshepang Lekhonkhobe
16244b884d
reference: make that less awkward to read
2015-09-24 07:43:37 +02:00
Tshepang Lekhonkhobe
64cc19d520
reference: "ffi" is normally in upper case
2015-09-24 07:27:16 +02:00
Sebastian Wicki
af68cdfea1
rustc: Add target_vendor for target triples
...
This adds a new target property, `target_vendor` which can be used as a
matcher for conditional compilation. The vendor is part of the autoconf
target triple: <arch><sub>-<vendor>-<os>-<env>
The default value for `target_vendor` is "unknown".
Matching against the `target_vendor` with `#[cfg]` is currently feature
gated as `cfg_target_vendor`.
2015-09-24 01:44:55 +02:00
Reza Akhavan
6de473addd
Update error-handling.md
2015-09-21 21:33:15 -07:00
bors
c06f464d01
Auto merge of #28563 - baskerville:trpl-typo, r=bluss
2015-09-21 12:24:52 +00:00
Bastien Dejean
5b41488f3a
TRPL: Fix typo
2015-09-21 12:37:58 +02:00
bors
f859507de8
Auto merge of #28548 - steveklabnik:gh28545, r=alexcrichton
...
so say so in the FAQ
Fixes #28545
2015-09-21 06:07:03 +00:00
bors
0418a43fa3
Auto merge of #28541 - baskerville:trpl-two-typos, r=steveklabnik
...
r? @steveklabnik
2015-09-21 00:58:03 +00:00
Steve Klabnik
8355d3a60f
We are production ready
...
so say so in the FAQ
Fixes #28545
2015-09-20 15:53:47 -04:00
Bastien Dejean
856f97a15e
TRPL: Fix two typos
2015-09-20 19:13:43 +02:00
bors
f5a64a678f
Auto merge of #28499 - semmaz:doc-anchor-fix, r=steveklabnik
...
This changes how rustic generate `id` and `href` attributes for section header anchor. Now they are more github-like.
Also fixes breakage in docs caused by this and broken links in "Error Handling" section of book.
r? @steveklabnik
cc @alexcrichton
2015-09-20 16:21:43 +00:00
Simon Mazur
970b86b1bb
doc: Fix broken links
2015-09-20 13:24:47 +03:00
Manish Goregaokar
8f8fe8194d
Rollup merge of #28525 - Wallacoloo:book-4.8-double-more, r=steveklabnik
...
This is a simple grammar fix in which the previous author accidentally repeated a word when (s)he shouldn't have.
2015-09-20 11:16:27 +05:30
Manish Goregaokar
d007eb628a
Rollup merge of #28463 - critiqjo:book-concurrency, r=steveklabnik
...
Fixes #28458
Details about `Arc` may be too soon to be described together with `Sync`... Tell me what you think.
r? @steveklabnik
2015-09-20 11:16:26 +05:30
Colin Wallace
a35f1b29d7
Fix "more more" typo
2015-09-19 17:19:29 -07:00
critiqjo
a0f214e257
trpl: Improve clarity in Concurrency
2015-09-19 21:11:17 +05:30
Steve Klabnik
b2c7e7791a
Rollup merge of #28496 - davidszotten:fix_error_anchors, r=steveklabnik
2015-09-19 11:15:48 -04:00
Steve Klabnik
d557f4a60f
Rollup merge of #28485 - Wallacoloo:clarify-let-lhs, r=alexcrichton
...
In code like `let x = 5`, I am initially confused as to the meaning of "let doesn't take a name on the left hand side, it actually accepts a pattern." - I interpret that as the pattern being located as: `<pattern> let [...]`.
I think what is meant is that the name/pattern is on the left hand side *of the assignment*, rather than to the left of the *let* statement. This change clarifies that.
2015-09-19 11:15:48 -04:00
David Szotten
5ab3058569
change back to anchors; divs break md
2015-09-19 12:06:36 +01:00
David Szotten
f7d8b41814
missing punctuation
2015-09-19 11:45:30 +01:00
David Szotten
436e8d69bf
its vs it's
2015-09-19 11:45:09 +01:00
David Szotten
3a5e9a3f99
wrap more referenced code blocks in divs
2015-09-19 11:44:55 +01:00
David Szotten
30c91cd7f7
angle brackets get mis-parsed. bug?
2015-09-19 11:43:57 +01:00
David Szotten
4e42fcd92a
link needs puncuation
2015-09-19 11:43:32 +01:00
David Szotten
634ffe5624
remove preceeding blank line
2015-09-18 22:16:31 +01:00
David Szotten
9d3deb4766
fix anchor link
2015-09-18 22:12:16 +01:00
bors
dc1c7975b0
Auto merge of #28336 - petrochenkov:empstr, r=pnkfelix
...
Closes https://github.com/rust-lang/rust/issues/24266
Closes https://github.com/rust-lang/rust/issues/16819
2015-09-18 16:57:21 +00:00
Ms2ger
1a3b422207
Use divs with ids rather than as with names.
...
The id attribute has been an official part of HTML since 1997. There is no
reason not to use it.
2015-09-18 15:52:19 +02:00
Vadim Petrochenkov
1eb42f1c78
Add feature gate
2015-09-18 15:28:01 +03:00
Vadim Petrochenkov
605a472948
Add some more tests
2015-09-18 15:26:09 +03:00
Colin Wallace
cbc9517b02
Clarify where let accepts a pattern, spatially
2015-09-17 21:39:19 -07:00
Steve Klabnik
7a5cd3c274
Rollup merge of #28473 - tshepang:lowercase, r=steveklabnik
2015-09-17 17:06:56 -04:00
Steve Klabnik
cd5870f3a3
Rollup merge of #28471 - tshepang:markup, r=steveklabnik
2015-09-17 17:06:56 -04:00
Steve Klabnik
fcfcee1363
Rollup merge of #28470 - tshepang:idiom, r=steveklabnik
2015-09-17 17:06:56 -04:00
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