Commit Graph

44358 Commits

Author SHA1 Message Date
Frank McSherry
d673bdef0f minor grammatical update
Grammatical update (and passive -> active, but I'm not sure if "Rust" is often used as a subject in the book; feel free to revert that part for style, but keep the subject-verb agreement)
2015-07-13 17:22:08 +02:00
bors
df39a92e22 Auto merge of #27011 - dotdash:issue-26996, r=luqmana
If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.
2015-07-13 12:24:25 +00:00
Björn Steinbrink
043d7b5198 Correctly detect reassignments to the interior of matched structs/tuples
If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.
2015-07-13 13:23:13 +02:00
bors
edf29a7102 Auto merge of #26999 - rick68:patch-13, r=Gankro
Reverse PR `#26944 `, symbol `#` are actually as intended.
2015-07-13 10:53:14 +00:00
bors
a16a4173c9 Auto merge of #26990 - rwz:patch-1, r=alexcrichton
The current example does not illustrate threaded behavior imo.
2015-07-13 09:15:12 +00:00
bors
5f552a5da5 Auto merge of #26981 - wthrowe:div_docs, r=Gankro
This resolves #26845.

I'm not entirely satisfied with the placement of the rounding discussion in the docs for the `Div` and `Rem` traits, but I couldn't come up with anywhere better to put it.  Suggestions are welcome.

I didn't add any discussion of rounding to the `checked_div` (or rem) or `wrapping_div` documentation because those seem to make it pretty clear that they do the same thing as `Div`.
2015-07-13 07:03:01 +00:00
bors
c044791d80 Auto merge of #26910 - nrc:ice-lang-item, r=@huonw 2015-07-13 05:32:33 +00:00
bors
07be6299d8 Auto merge of #26947 - nagisa:unicode-escape-error, r=nrc
Inspired by the now-mysteriously-closed https://github.com/rust-lang/rust/pull/26782.

This PR introduces better error messages when unicode escapes have invalid format (e.g. `\uFFFF`). It also makes rustc always tell the user that escape may not be used in byte-strings and bytes and fixes some spans to not include unecessary characters and include escape backslash in some others.
2015-07-13 04:00:49 +00:00
bors
7ea2674c75 Auto merge of #26750 - nrc:refactor-submod, r=sfackler
This makes the functionality usable from outside the parser
2015-07-13 01:07:51 +00:00
William Throwe
7824956eff Move rounding discussion to integer Div/Rem impls 2015-07-12 20:28:16 -04:00
Nick Cameron
7fb8208758 Don't ICE when missing owned_box lang item
Closes #20549
2015-07-13 11:53:16 +12:00
bors
e1ac57de67 Auto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brson
TLS tests have been deadlocking on the OSX bots for quite some time now and this
commit is the result of the investigation into what's going on. It turns out
that a value in TLS which is being destroyed (e.g. the destructor is run) can be
reset back to the initial state **while the destructor is running** if TLS is
re-accessed.

To fix this we stop calling drop_in_place on OSX and instead move the data to a
temporary location on the stack.
2015-07-12 23:37:12 +00:00
Simonas Kazlauskas
4d65ef4549 Tell unicode escapes can’t be used as bytes earlier/more 2015-07-13 02:09:22 +03:00
Wei-Ming Yang
5f8b1fadb8 Update boxed.rs
Reverse PR `#26944 `, symbol `#` are actually as intended.
2015-07-13 06:43:54 +08:00
Alex Crichton
987dc84b52 std: Fix a TLS destructor bug on OSX
TLS tests have been deadlocking on the OSX bots for quite some time now and this
commit is the result of the investigation into what's going on. It turns out
that a value in TLS which is being destroyed (e.g. the destructor is run) can be
reset back to the initial state **while the destructor is running** if TLS is
re-accessed.

To fix this we stop calling drop_in_place on OSX and instead move the data to a
temporary location on the stack.
2015-07-12 15:08:40 -07:00
bors
05d8767289 Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton
Fixes #26900
2015-07-12 22:05:59 +00:00
bors
adcae006d2 Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakis
This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is `ctxt` which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust.

r? @eddyb 

cc @nikomatsakis
2015-07-12 19:22:11 +00:00
Pavel Pravosud
49e45833f8 Clean up trailing whitespaces 2015-07-12 11:23:09 -07:00
Pavel Pravosud
6e1d01f79e Fix multi-threading example in dining-philosophers 2015-07-12 11:22:52 -07:00
bors
50d305e498 Auto merge of #26966 - nagisa:tail-init, r=alexcrichton
Fixes #26906
2015-07-12 13:16:24 +00:00
bors
2999003be8 Auto merge of #26965 - bluss:cstring-debug, r=alexcrichton
Use escaped byte string representation for CString Debug

Faithfully represent the contents of the CString and CStr in their Debug
impl, by treating them as byte strings with our default escaping to
ascii representation.

Add impl Debug for CStr.

Fixes #26964.
2015-07-12 11:45:23 +00:00
bors
aff208033b Auto merge of #26985 - Manishearth:rollup, r=Manishearth
- Successful merges: #26881, #26967, #26973, #26974, #26976, #26979
- Failed merges:
2015-07-12 09:50:13 +00:00
Manish Goregaokar
aad7cb8339 Rollup merge of #26979 - tshepang:trim, r=Gankro
- It is clear that what follows are re-exports
- There aren't so many re-exports that examples should be given
2015-07-12 18:35:55 +05:30
Manish Goregaokar
afe16ae7ff Rollup merge of #26976 - tshepang:more-simple-explanation, r=gankro
That sentence make me read it a few times before properly understanding it
2015-07-12 18:35:55 +05:30
Manish Goregaokar
dcc64d113c Rollup merge of #26974 - tshepang:trailing-comma, r=Gankro 2015-07-12 18:35:55 +05:30
Manish Goregaokar
bcc0b8cec7 Rollup merge of #26973 - tshepang:repetition, r=Gankro 2015-07-12 18:35:54 +05:30
Manish Goregaokar
1cf7b1e938 Rollup merge of #26967 - tsurai:master, r=steveklabnik
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples.

Documentation:
```rust
pub struct String {
    // some fields omitted
}
```

Playground:
```rust
Struct std::String
            
                [−]
            
        [src]
```

r? @steveklabnik
2015-07-12 18:35:54 +05:30
Manish Goregaokar
ad930f4145 Rollup merge of #26881 - andreastt:international_keyboard, r=alexcrichton
Avoids some code duplication and relies less on deprecated properties on `KeyboardEvent`.  The code is still looking quite bad, but that’s primarily because interop in this area is a disaster zone.
2015-07-12 18:35:54 +05:30
bors
88c1105fc7 Auto merge of #26931 - reem:string-conversions, r=alexcrichton
Implements merged RFC 1152.

Closes #26697.
2015-07-12 07:32:54 +00:00
bors
78547d2b95 Auto merge of #26972 - jethrogb:patch-1, r=alexcrichton
The File object needs to be writable for the set_len to succeed.
2015-07-12 06:02:17 +00:00
Jonathan Reem
69521affbb Add String::into_boxed_slice and Box<str>::into_string
Implements merged RFC 1152.

Closes #26697.
2015-07-11 21:31:56 -07:00
bors
da1b296e16 Auto merge of #26959 - dhuseby:i686-unknown-freebsd, r=alexcrichton
this adds support for i686-unknown-freebsd target.
2015-07-12 02:37:31 +00:00
William Throwe
218eb1277d Correct and clarify integer division rounding docs 2015-07-11 20:30:50 -04:00
bors
0c052199b9 Auto merge of #26913 - sfackler:tuple-debug, r=alexcrichton
This does change the Debug output for 1-tuples to `(foo)` instead of `(foo,)` but I don't think it's that big  of a deal.

r? @alexcrichton
2015-07-11 23:41:07 +00:00
Tshepang Lekhonkhobe
a458d46ea5 doc: remove redundant info
- It is clear that what follows are re-exports
- There aren't so many re-exports that examples should be given
2015-07-12 00:51:07 +02:00
bors
b8bb908d88 Auto merge of #26882 - andreastt:style_improvements, r=alexcrichton
Sharpens the help dialogues edges by removing border-padding, which
matches better with the rest of the document.

Also increases somewhat the rounded edges of the key symbols to
make it clear they are symbols.

Also introduces closing apostrophes and ellipsis for search field
placeholder.
2015-07-11 21:48:44 +00:00
Simonas Kazlauskas
7a90865db5 Implement RFC 1058 2015-07-12 00:47:56 +03:00
jethrogb
9262d647bb Change std::fs::File.set_len example and documentation
The File object needs to be writable for the truncate to succeed.
2015-07-11 14:17:45 -07:00
Tshepang Lekhonkhobe
ef8c3775af doc: make explanation easier to undrstand 2015-07-11 23:03:22 +02:00
Ulrik Sverdrup
92c8a9439b Use escaped byte string representation for CString Debug
Faithfully represent the contents of the CString and CStr in their Debug
impl, by treating them as byte strings with our default escaping to
ascii representation.

Add impl Debug for Cstr.

Fixes #26964.
2015-07-11 22:55:52 +02:00
bors
d18eb74009 Auto merge of #26878 - Esption:master, r=pnkfelix
I noticed in docs, specifically http://doc.rust-lang.org/std/primitive.u8.html#method.is_power_of_two, that it was like this, and it was apparently in multiple places too.

Didn't change any occurrences through the cross-depo things. There's a lot in /src/llvm/ for instance, but I'm not confident on how to go about sending fixes for those, so this is just what's in the base rust depo.

r? @steveklabnik
2015-07-11 19:18:02 +00:00
Tshepang Lekhonkhobe
de7d1c08d3 remove repetition from E0308 explanation 2015-07-11 20:21:10 +02:00
Wesley Wiser
ed472c8e0d Fix feature name 2015-07-11 12:34:01 -04:00
Wesley Wiser
5ee801adbf Fix version number on SliceConcatExt:join 2015-07-11 11:00:18 -04:00
Dave Huseby
c415683402 fixing trailing whitespace 2015-07-11 07:18:12 -07:00
Cristian Kubis
9e9698213c doc: remove playground links for structs and traits 2015-07-11 13:48:10 +02:00
bors
1b28ffa521 Auto merge of #26961 - Manishearth:rollup, r=Manishearth
- Successful merges: #26932, #26936, #26943, #26944
- Failed merges:
2015-07-11 07:40:27 +00:00
Manish Goregaokar
25b14375b7 Rollup merge of #26944 - rick68:patch-11, r=brson
fix typos
2015-07-11 18:40:13 +05:30
Manish Goregaokar
a36411d9db Rollup merge of #26943 - brson:installer, r=alexcrichton 2015-07-11 18:40:13 +05:30
Manish Goregaokar
ba6c808feb Rollup merge of #26936 - bluss:doc-array, r=steveklabnik
Small tweaks for the documentation of the primitive type array

Follow up to PR #26923, fix a few small details.
2015-07-11 18:40:13 +05:30