Commit graph

38955 commits

Author SHA1 Message Date
Manish Goregaokar 3b4b90130f Rollup merge of #22494 - msiemens:vec_map-append-split_off, r=Gankro 2015-02-23 11:43:58 -08:00
Manish Goregaokar bf7cde449b Rollup merge of #22538 - nagisa:properise-trans-asserts, r=nikomatsakis 2015-02-23 11:43:58 -08:00
Manish Goregaokar f1a6d67e5e Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelix 2015-02-23 11:43:57 -08:00
Manish Goregaokar bff94bd3c5 Rollup merge of #22624 - vadimcn:iss-13361, r=alexcrichton
This test appears to pass cleanly on master.
Closes #13361
2015-02-23 11:43:57 -08:00
Manish Goregaokar 8f921502bd Rollup merge of #22667 - dotdash:retslot_cast.rs, r=huonw
We already do this for the function arguments, but miss it for the
retslot pointer, which can lead to LLVM assertions because the retslot
has the wrong type.

Fixes #22663
2015-02-23 11:43:56 -08:00
Manish Goregaokar 5a41536462 Rollup merge of #22664 - lfairy:just-say-no, r=alexcrichton
Leading hyphens already don't work (#22661), so no code should break from this change.

Closes #22661.
2015-02-23 11:43:56 -08:00
Manish Goregaokar 65b1a98522 Rollup merge of #22640 - sfackler:fix-take, r=alexcrichton
We can't call into the inner reader for a 0-byte read because that may
end up blocking or returning an error.

r? @alexcrichton
2015-02-23 11:43:56 -08:00
Manish Goregaokar db04229d23 Rollup merge of #22696 - stepancheg:use-box, r=alexcrichton
e. g.

```
let b: Box<Foo> = Box::from_raw(p);
```

instead of

```
let b: Box<Foo> = mem::transmute(p);
```

Patch also changes closure release code in `src/libstd/sys/unix/thread.rs`
when `pthread_create` failed. Raw pointer was transmuted to box of
`FnOnce()` instead of `Thunk`. This code was probably never executed,
because `pthread_create` rarely fails.

(And there are two more patches in PR: fix typo in doc and mark `from_raw` and `into_raw` functions inline.)
2015-02-23 23:28:49 +05:30
Manish Goregaokar b2302a50ed Rollup merge of #22693 - tshepang:use-new-slicing-syntax-runtest, r=alexcrichton 2015-02-23 23:28:49 +05:30
Manish Goregaokar 0750cf79f9 Rollup merge of #22688 - tshepang:use-new-slicing-syntax, r=alexcrichton 2015-02-23 23:28:49 +05:30
Manish Goregaokar 5aee931ca5 Rollup merge of #22691 - nick29581:fix-save-impl, r=huonw
r? @huonw
2015-02-23 23:28:48 +05:30
Manish Goregaokar 07b6b7492d Rollup merge of #22674 - untitaker:issue22243, r=alexcrichton
"body": null,
2015-02-23 23:28:48 +05:30
Manish Goregaokar 8c1606b2d2 Rollup merge of #22670 - shepmaster:c_str_typos, r=Manishearth 2015-02-23 23:28:48 +05:30
Manish Goregaokar 2af91c4555 Rollup merge of #22662 - iKevinY:readme-changes, r=steveklabnik
- Various grammatical changes.
- Use triple-backtick syntax and `sh` highlighting for code blocks.
- Fix indentation of code block in step 2 of \"Building on Windows\".
- Use title case for \"Getting Help\" subheading.
2015-02-23 23:28:48 +05:30
Manish Goregaokar 4e73d4950d Rollup merge of #22660 - achernya:tuple-reference, r=alexcrichton
The Rust Reference should include the tuple indexing (using a number
as a field) notation; currently it is only available on
http://doc.rust-lang.org/std/primitive.tuple.html and not easily
searchable.
2015-02-23 23:28:48 +05:30
Manish Goregaokar f0085060fe Rollup merge of #22658 - glacjay:issue-22535, r=Gankro
fix issue #22535
2015-02-23 23:28:48 +05:30
Manish Goregaokar 7d46e049ae Rollup merge of #22652 - tigarmo:patch-1, r=Manishearth
Update from straight line to reference-style link.
2015-02-23 23:28:47 +05:30
Manish Goregaokar c9c5dd4b5b Rollup merge of #22643 - fhartwig:bitvec-doc-fix, r=alexcrichton
It looks like a few spots in the documentation were missed when renaming `Bitv` and `BitvSet`. This fixes the docs to use their current names.
2015-02-23 23:28:47 +05:30
Manish Goregaokar 90d4aaad3a Rollup merge of #22613 - nick29581:fix-save-alias, r=huonw
r? @huonw
2015-02-23 23:28:47 +05:30
Manish Goregaokar f73457a1cc Rollup merge of #22612 - jxcl:iter-replace, r=steveklabnik
r? @steveklabnik

I've updated the iterators chapter to reflect the fact that you can now iterate over `for` loops without calling `.iter()`.
2015-02-23 23:28:47 +05:30
Manish Goregaokar 26180e9940 Rollup merge of #22601 - bombless:patch-1, r=Manishearth
r? @steveklabnik
2015-02-23 23:28:47 +05:30
Manish Goregaokar eb06c0ecd2 Rollup merge of #22593 - brson:spatch, r=steveklabnik
r? @steveklabnik
2015-02-23 23:28:46 +05:30
Manish Goregaokar af81ec2f43 Rollup merge of #22559 - kmcallister:borrowck-readme, r=nikomatsakis
And minor fixes to other docs.

r? @nikomatsakis
2015-02-23 23:28:46 +05:30
Manish Goregaokar 0fab2b9535 Rollup merge of #22556 - brson:str, r=steveklabnik
Clarify that `to_string` is how you make `String`. Use a coercion in an example.

r? @steveklabnik
2015-02-23 23:28:46 +05:30
Manish Goregaokar 59726953cc Rollup merge of #22514 - diamondman:intro_doc_threading, r=steveklabnik
Fixed example threaded code in intro doc never printing results. Threads were created with Thread::spawn instead of Thread::scoped. Also added correct thread handling like in the first example of the document.
2015-02-23 23:28:46 +05:30
Manish Goregaokar 1517313a74 Rollup merge of #22513 - steveklabnik:doc_str, r=brson 2015-02-23 23:28:46 +05:30
Manish Goregaokar a0375e1b4f Rollup merge of #22505 - tshepang:current_dir, r=steveklabnik 2015-02-23 23:28:45 +05:30
Manish Goregaokar 1acd7c9fe1 Rollup merge of #22371 - fhahn:issue-17829-compiletest-nocapture, r=Manishearth
This is a patch for #17829.

In `compiletest` there are multiple layers which capture the output. The first layer is  `run_tests_console` which is used to execute all tests.

Then there are some tests that contain unit tests, which by default also captures output. Therefore `compiletest` adds `RUST_TEST_NOCAPTURE` (and `RUST_TEST_TASKS` for completeness) to the run environment of the task.

Finally, the task used to execute a test redirects stdout and stdin. At the moment, the `VERBOSE=1` prints all captured output of the task (but has to print stdout and stderr separately). So at the moment using `RUST_TEST_NOCAPTURE=1` only makes sense when also using `VERBOSE=1` which seems a little bit cumbersome.

Should I update the patch to only print the output of the tasks that actually execute the test (`VERBOSE=1` includes other stuff, like the output of the task used to compile the test)? This will probably involve adding an extra flag to some functions in `src/compiletest/runtest.rs` to distinguish compilation runs from runs that execute the actual tests.
2015-02-23 14:43:44 +05:30
Manish Goregaokar 46a545100a Rollup merge of #22270 - steveklabnik:gh22152, r=huonw
Fixes #22152
2015-02-23 14:43:38 +05:30
bors f0f7ca27de Auto merge of #21769 - brooksbp:column-line-macro, r=nick29581
Please see discussion in #19284 .
2015-02-23 01:53:38 +00:00
Alexander Bliskovsky 9f2b0671f8 Fixed erroneous statements in iterators.md. 2015-02-22 20:26:54 -05:00
Alexander Bliskovsky 72eaf2c30e Switch to &vector notation in the iterators chapter. 2015-02-22 20:26:54 -05:00
Stepan Koltsov 26d9f0ab1a Use boxed functions instead of transmute
... to convert between Box and raw pointers. E. g. use

```
let b: Box<Foo> = Box::from_raw(p);
```

instead of

```
let b: Box<Foo> = mem::transmute(p);
```

Patch also changes closure release code in `src/libstd/sys/unix/thread.rs`
when `pthread_create` failed. Raw pointer was transmuted to box of
`FnOnce()` instead of `Thunk`. This code was probably never executed,
because `pthread_create` rarely fails in practice.
2015-02-23 02:59:17 +03:00
Stepan Koltsov 554022e583 boxed: mark from_raw and into_raw functions inline 2015-02-23 02:58:54 +03:00
Tshepang Lekhonkhobe 6ea97c457a runtest: update slicing syntax where [] becomes [..] 2015-02-23 01:49:07 +02:00
Stepan Koltsov 852eadc295 boxed: fix typo in doc 2015-02-23 02:25:47 +03:00
Nick Cameron 04b0a3a0a6 save-analysis: fix impls on primitive types 2015-02-23 12:15:11 +13:00
bors 67eb38ee4c Auto merge of #22466 - Kimundi:str_pattern_ai_safe, r=aturon
This is not a complete implementation of the RFC:

- only existing methods got updated, no new ones added
- doc comments are not extensive enough yet
- optimizations got lost and need to be reimplemented

See https://github.com/rust-lang/rfcs/pull/528

Technically a

[breaking-change]
2015-02-22 22:45:46 +00:00
Tshepang Lekhonkhobe 23fe16eab1 rustbook: update slicing syntax where [] --> [..] 2015-02-23 00:20:42 +02:00
Jessy Diamond Exum 6154c88ddc Update intro.md to fix thread spawning example Closes #22419
Fixed example threaded code in intro doc never printing results. Threads were created with Thread::spawn instead of Thread::scoped.
2015-02-22 11:45:31 -08:00
Nick Cameron 6f9b91d429 save-analysis: handle type defs in struct patterns 2015-02-23 08:16:04 +13:00
Steve Klabnik 27f357106e Improve documentation for libcollections/str 2015-02-22 14:15:10 -05:00
Steve Klabnik d7c02c39e5 Link from literals to their representation
Fixes #22152
2015-02-22 14:13:16 -05:00
Markus Unterwaditzer a499148457 Fix another occurrence of #22243 2015-02-22 17:13:41 +01:00
Simonas Kazlauskas 9be8ec82ce Properly translate methods with foreign CC
This fixes a general issue of trying to define extern functions inside impl blocks resulting in
ICE.

Fixes #21238
Fixes #20734
Fixes #19047
2015-02-22 16:04:18 +02:00
Simonas Kazlauskas 0c25e6f509 Convert some panics to bug diagnostics in trans 2015-02-22 16:03:21 +02:00
Jake Goulding c5a3cbb45b Fix typos in CStr docs 2015-02-22 08:52:07 -05:00
Markus Siemens 25d3e01a5a Implement append and split_off for VecMap (RFC 509)
Implements `append()` and `split_off()` for `VecMap`. It's worth noting
that `append()` will overwrite existing keys (the RFC doesn't specify how
`append()` should handle duplicate keys).

cc #19986
2015-02-22 13:41:53 +01:00
Björn Steinbrink b593c60c33 Add missing cast for retslots in case of "subtyping" due to trait bounds
We already do this for the function arguments, but miss it for the
retslot pointer, which can lead to LLVM assertions because the retslot
has the wrong type.

Fixes #22663
2015-02-22 12:47:27 +01:00
bors dcc6ce2c77 Auto merge of #22574 - huonw:remove-lame-statics, r=alexcirchton
Add a basic test that checks that the types catch the most glaring
errors that could occur.

cc #22444
2015-02-22 10:27:08 +00:00