]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoChange `Debug` implementation of `BTree*` as well
Tobias Bucher [Tue, 10 Feb 2015 23:14:48 +0000 (00:14 +0100)]
Change `Debug` implementation of `BTree*` as well

9 years agoModify collection's `Debug` output to resemble in their content only
Tobias Bucher [Tue, 10 Feb 2015 21:12:13 +0000 (22:12 +0100)]
Modify collection's `Debug` output to resemble in their content only

9 years agoAuto merge of #22749 - kballard:process-stdio-constructors, r=alexcrichton
bors [Tue, 24 Feb 2015 15:01:28 +0000 (15:01 +0000)]
Auto merge of #22749 - kballard:process-stdio-constructors, r=alexcrichton

There are no tests for this because testing inherit/null is tricky.
Probably why there weren't tests for it to begin with.

9 years agoAuto merge of #22755 - Manishearth:rollup, r=Manishearth
bors [Tue, 24 Feb 2015 09:33:17 +0000 (09:33 +0000)]
Auto merge of #22755 - Manishearth:rollup, r=Manishearth

9 years agoFix integers in tests (fixup #22700)
Manish Goregaokar [Tue, 24 Feb 2015 08:19:01 +0000 (13:49 +0530)]
Fix integers in tests (fixup #22700)

9 years agoRollup merge of #22720 - edwardw:enum-struct-ident-walk-into-a-bar, r=nick29581
Manish Goregaokar [Tue, 24 Feb 2015 07:03:40 +0000 (12:33 +0530)]
Rollup merge of #22720 - edwardw:enum-struct-ident-walk-into-a-bar, r=nick29581

 Closes #22589
Closes #22647
Closes #22665
Closes #22712

9 years agoAdd tests for expect ident but find enum or struct panic
Edward Wang [Tue, 24 Feb 2015 06:59:24 +0000 (14:59 +0800)]
Add tests for expect ident but find enum or struct panic

Closes #22589
Closes #22647
Closes #22665
Closes #22712

9 years agoRemove another instance of ty_open (fixup #22213)
Manish Goregaokar [Tue, 24 Feb 2015 06:55:56 +0000 (12:25 +0530)]
Remove another instance of ty_open (fixup #22213)

9 years agoRollup merge of #22213 - eddyb:ty_open-case-closed, r=nikomatsakis
Manish Goregaokar [Tue, 24 Feb 2015 06:56:01 +0000 (12:26 +0530)]
Rollup merge of #22213 - eddyb:ty_open-case-closed, r=nikomatsakis

 This type wasn't necessary, as there was no place using it and unsized types not wrapped in it, at the same time.
r? @nikomatsakis

9 years agorustc_trans: use an Lvalue Datum for an unsized lvalue to avoid bogus drops.
Eduard Burtescu [Tue, 24 Feb 2015 06:22:43 +0000 (08:22 +0200)]
rustc_trans: use an Lvalue Datum for an unsized lvalue to avoid bogus drops.

9 years agotests: update expected recursion limit errors for the temporary lack of spans.
Eduard Burtescu [Fri, 20 Feb 2015 17:25:30 +0000 (19:25 +0200)]
tests: update expected recursion limit errors for the temporary lack of spans.

9 years agoRemove ty_open and treat Unsized lvalues as *Unsized.
Eduard Burtescu [Tue, 17 Feb 2015 18:27:01 +0000 (20:27 +0200)]
Remove ty_open and treat Unsized lvalues as *Unsized.

9 years agoRemove double expr_u32 (fixup #22700)
Manish Goregaokar [Tue, 24 Feb 2015 02:09:55 +0000 (07:39 +0530)]
Remove double expr_u32 (fixup #22700)

9 years agoRollup merge of #22594 - alexcrichton:issue-22577, r=aturon
Manish Goregaokar [Tue, 24 Feb 2015 01:47:28 +0000 (07:17 +0530)]
Rollup merge of #22594 - alexcrichton:issue-22577, r=aturon

 The windows/unix modules were currently inconsistent about the traits being
implemented for `DirEntry` and there isn't much particular reason why the traits
*couldn't* be implemented for `ReadDir` and `DirEntry`, so this commit ensures
that they are implemented.

Closes #22577

9 years agoRollup merge of #22580 - pnkfelix:guard-pat-cfg2, r=pnkfelix
Manish Goregaokar [Tue, 24 Feb 2015 01:47:20 +0000 (07:17 +0530)]
Rollup merge of #22580 - pnkfelix:guard-pat-cfg2, r=pnkfelix

 aatch's cfg revisions, namely to match expressions

Revise handling of match expressions so that arms branch to next arm.

Update the graphviz tests accordingly.

Fixes #22073. (Includes regression test for the issue.)

9 years agoRollup merge of #22428 - erickt:io-wrappers, r=aturon
Manish Goregaokar [Tue, 24 Feb 2015 01:47:04 +0000 (07:17 +0530)]
Rollup merge of #22428 - erickt:io-wrappers, r=aturon

 Also includes some minor optimizations to the Vec and slice writers to remove the unnecessary loop.

9 years agoRollup merge of #22301 - nikomatsakis:object-safe-sized-methods, r=huonw
Manish Goregaokar [Tue, 24 Feb 2015 01:46:55 +0000 (07:16 +0530)]
Rollup merge of #22301 - nikomatsakis:object-safe-sized-methods, r=huonw

 RFC 817 is not yet accepted, but I wanted to put this code up so people can see how it works. And to be ready lest it should be accepted.

cc rust-lang/rfcs#817

9 years agoRollup merge of #22473 - leejunseok:fix_pointer_example, r=steveklabnik
Manish Goregaokar [Tue, 24 Feb 2015 01:45:10 +0000 (07:15 +0530)]
Rollup merge of #22473 - leejunseok:fix_pointer_example, r=steveklabnik

 Revised an example in the Pointers chapter of TRPL (the guide) as per #21575.

9 years agoRollup merge of #22730 - ipetkov:lint-docs, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:45:03 +0000 (07:15 +0530)]
Rollup merge of #22730 - ipetkov:lint-docs, r=alexcrichton

 This is a breaking change if missing docs are forbidden in any module or crate.

I had to add documentation to undocumented associated types in libstd and libcore, please let me know if the documentation is inadequate anywhere!

Fixes #20648

9 years agoRollup merge of #22728 - vojtechkral:int-audit-thread-local, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:44:56 +0000 (07:14 +0530)]
Rollup merge of #22728 - vojtechkral:int-audit-thread-local, r=alexcrichton

 Integer audit in `libstd/thread_local/*`, part of #22240

9 years agoRollup merge of #22700 - nick29581:ints_hash, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:44:41 +0000 (07:14 +0530)]
Rollup merge of #22700 - nick29581:ints_hash, r=alexcrichton

 fmt and hash are pretty straightforward I think. sync is a bit more complex. I thought one or two of the `isize`s ought to be `i32`s, but that would require a bunch of casting (the root cause being the lack of atomics other than isize/usize).

r? @alexcrichton

9 years agoRollup merge of #22632 - nagisa:kill-show-string-with-fire!, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:44:34 +0000 (07:14 +0530)]
Rollup merge of #22632 - nagisa:kill-show-string-with-fire!, r=alexcrichton

 Toss the tomatoes!

r? @aturon

Fixes #22478. The underlying bug(?) behind that issue still exists though and there’s another issue that reports it.

9 years agoRollup merge of #22740 - frewsxcv:patch-4, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:43:54 +0000 (07:13 +0530)]
Rollup merge of #22740 - frewsxcv:patch-4, r=alexcrichton

 Fixes #17929

9 years agoRollup merge of #22726 - semarie:openbsd-Wl-as-needed, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:43:48 +0000 (07:13 +0530)]
Rollup merge of #22726 - semarie:openbsd-Wl-as-needed, r=alexcrichton

 The `-Wl,--as-needed` option was removed during first stages of
bootstrapping between Linux and OpenBSD.

Restore it, as it seems to be ok now.

9 years agoRollup merge of #22719 - steveklabnik:typo_fix, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:43:41 +0000 (07:13 +0530)]
Rollup merge of #22719 - steveklabnik:typo_fix, r=alexcrichton

9 years agoRollup merge of #22711 - lummax:patch-1, r=dotdash
Manish Goregaokar [Tue, 24 Feb 2015 01:43:35 +0000 (07:13 +0530)]
Rollup merge of #22711 - lummax:patch-1, r=dotdash

 Update the reference page to the change in #20680.

9 years agoRollup merge of #22687 - tshepang:prelude-nits, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:43:28 +0000 (07:13 +0530)]
Rollup merge of #22687 - tshepang:prelude-nits, r=alexcrichton

9 years agoRollup merge of #22680 - FlaPer87:type_builtin, r=nikomatsakis
Manish Goregaokar [Tue, 24 Feb 2015 01:43:21 +0000 (07:13 +0530)]
Rollup merge of #22680 - FlaPer87:type_builtin, r=nikomatsakis

 Fixes #20302

9 years agoRollup merge of #22653 - tsion:master, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:43:14 +0000 (07:13 +0530)]
Rollup merge of #22653 - tsion:master, r=alexcrichton

 r? @steveklabnik

9 years agoRollup merge of #22604 - aochagavia:docs, r=alexcrichton
Manish Goregaokar [Tue, 24 Feb 2015 01:43:07 +0000 (07:13 +0530)]
Rollup merge of #22604 - aochagavia:docs, r=alexcrichton

9 years agoFix the std::process::Stdio constructors
Kevin Ballard [Tue, 24 Feb 2015 05:41:27 +0000 (21:41 -0800)]
Fix the std::process::Stdio constructors

There are no tests for this because testing inherit/null is tricky.
Probably why there weren't tests for it to begin with.

9 years agoAuto merge of #21581 - DiamondLovesYou:nacl-libc, r=alexcrichton
bors [Tue, 24 Feb 2015 05:21:38 +0000 (05:21 +0000)]
Auto merge of #21581 - DiamondLovesYou:nacl-libc, r=alexcrichton

This does not allow Rust proper to target NaCl; this just adds support for NaCl
crosses to `liblibc` on crates.io.

9 years agoAuto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakis
bors [Tue, 24 Feb 2015 02:22:44 +0000 (02:22 +0000)]
Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakis

This is one more step towards completing #13231

This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go.

The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items.

Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well.

This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`

9 years agoAuto merge of #22526 - dotdash:llvmup, r=alexcrichton
bors [Mon, 23 Feb 2015 23:11:36 +0000 (23:11 +0000)]
Auto merge of #22526 - dotdash:llvmup, r=alexcrichton

Fixes #22159
Fixes #21721

9 years agoEnforce a white background for the docs
Corey Farwell [Mon, 23 Feb 2015 23:04:51 +0000 (18:04 -0500)]
Enforce a white background for the docs

Fixes #17929

9 years agostd::prelude: code consistency nits
Tshepang Lekhonkhobe [Sun, 22 Feb 2015 18:44:59 +0000 (20:44 +0200)]
std::prelude: code consistency nits

9 years agoAuto merge of #22724 - Manishearth:rollup, r=alexcrichton
bors [Mon, 23 Feb 2015 20:47:30 +0000 (20:47 +0000)]
Auto merge of #22724 - Manishearth:rollup, r=alexcrichton

Seems to pass `check-stage1`, but I had to tweak some things so it's going through the test gauntlet again.

9 years agoTest fixes and rebase conflicts
Alex Crichton [Mon, 23 Feb 2015 19:52:31 +0000 (11:52 -0800)]
Test fixes and rebase conflicts

9 years agoMake traits with by-value-self be considered object safe.
Niko Matsakis [Mon, 23 Feb 2015 20:27:55 +0000 (15:27 -0500)]
Make traits with by-value-self be considered object safe.

9 years agoRemove awful hack concerning `Trait impl Trait` in method resolution code that I...
Niko Matsakis [Mon, 9 Feb 2015 15:44:17 +0000 (10:44 -0500)]
Remove awful hack concerning `Trait impl Trait` in method resolution code that I've been longing to remove for quite some time.

9 years agoExtend object safety so that methods with Sized:Self are exempt.
Niko Matsakis [Mon, 9 Feb 2015 13:54:34 +0000 (08:54 -0500)]
Extend object safety so that methods with Sized:Self are exempt.

9 years agoFix windows failure (fixup #22538)
Manish Goregaokar [Mon, 23 Feb 2015 19:19:50 +0000 (00:49 +0530)]
Fix windows failure (fixup #22538)

9 years agoRollup merge of #22723 - alexcrichton:less-flaky-windows-test, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 18:58:12 +0000 (00:28 +0530)]
Rollup merge of #22723 - alexcrichton:less-flaky-windows-test, r=alexcrichton

 If these tests exit while a thread is panicking it often leads to situations
like #22628.

9 years agoimport boxed for alloc/rc.rs (fixup #22696)
Manish Goregaokar [Mon, 23 Feb 2015 14:04:25 +0000 (19:34 +0530)]
import boxed for alloc/rc.rs (fixup #22696)

9 years agoAdd marker trait to test (fixup #22538)
Manish Goregaokar [Mon, 23 Feb 2015 13:13:43 +0000 (18:43 +0530)]
Add marker trait to test (fixup #22538)

9 years agoRollup merge of #22320 - petrochenkov:eq, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:28:09 +0000 (14:58 +0530)]
Rollup merge of #22320 - petrochenkov:eq, r=alexcrichton

9 years agoRollup merge of #22490 - nagisa:inline-args, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:27:47 +0000 (14:57 +0530)]
Rollup merge of #22490 - nagisa:inline-args, r=alexcrichton

9 years agoRollup merge of #22494 - msiemens:vec_map-append-split_off, r=Gankro
Manish Goregaokar [Mon, 23 Feb 2015 09:27:38 +0000 (14:57 +0530)]
Rollup merge of #22494 - msiemens:vec_map-append-split_off, r=Gankro

9 years agoRollup merge of #22538 - nagisa:properise-trans-asserts, r=nikomatsakis
Manish Goregaokar [Mon, 23 Feb 2015 09:27:29 +0000 (14:57 +0530)]
Rollup merge of #22538 - nagisa:properise-trans-asserts, r=nikomatsakis

9 years agoRollup merge of #22544 - bombless:fix-pattern, r=pnkfelix
Manish Goregaokar [Mon, 23 Feb 2015 09:27:21 +0000 (14:57 +0530)]
Rollup merge of #22544 - bombless:fix-pattern, r=pnkfelix

9 years agoRollup merge of #22624 - vadimcn:iss-13361, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:26:29 +0000 (14:56 +0530)]
Rollup merge of #22624 - vadimcn:iss-13361, r=alexcrichton

 This test appears to pass cleanly on master.
Closes #13361

9 years agoRollup merge of #22667 - dotdash:retslot_cast.rs, r=huonw
Manish Goregaokar [Mon, 23 Feb 2015 09:24:50 +0000 (14:54 +0530)]
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

9 years agoRollup merge of #22664 - lfairy:just-say-no, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:24:43 +0000 (14:54 +0530)]
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.

9 years agoRollup merge of #22640 - sfackler:fix-take, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:24:34 +0000 (14:54 +0530)]
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

9 years agoUpdate missing-doc test to explicitly check errors
Ivan Petkov [Mon, 23 Feb 2015 19:33:52 +0000 (11:33 -0800)]
Update missing-doc test to explicitly check errors

This way we can be sure the correct error is displayed for the
respective code type.

9 years agoUpdate missing-docs lint to check associated type declarations
Ivan Petkov [Mon, 23 Feb 2015 19:07:37 +0000 (11:07 -0800)]
Update missing-docs lint to check associated type declarations

[breaking-change]

Fixes #20648

9 years agoAdd documentation to associated types in libcore, libstd
Ivan Petkov [Mon, 23 Feb 2015 19:05:55 +0000 (11:05 -0800)]
Add documentation to associated types in libcore, libstd

9 years agoopenbsd: restore linker option
Sébastien Marie [Mon, 23 Feb 2015 19:03:15 +0000 (20:03 +0100)]
openbsd: restore linker option

The -Wl,--as-needed option was removed during first stages of
bootstrapping between Linux and OpenBSD.

Restore it, as it seems to be ok now.

9 years agoRollup merge of #22696 - stepancheg:use-box, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:18:54 +0000 (14:48 +0530)]
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.)

9 years agoRollup merge of #22693 - tshepang:use-new-slicing-syntax-runtest, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:18:45 +0000 (14:48 +0530)]
Rollup merge of #22693 - tshepang:use-new-slicing-syntax-runtest, r=alexcrichton

9 years agoRollup merge of #22688 - tshepang:use-new-slicing-syntax, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:18:35 +0000 (14:48 +0530)]
Rollup merge of #22688 - tshepang:use-new-slicing-syntax, r=alexcrichton

9 years agoRollup merge of #22691 - nick29581:fix-save-impl, r=huonw
Manish Goregaokar [Mon, 23 Feb 2015 09:15:34 +0000 (14:45 +0530)]
Rollup merge of #22691 - nick29581:fix-save-impl, r=huonw

 r? @huonw

9 years agoRollup merge of #22674 - untitaker:issue22243, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:15:25 +0000 (14:45 +0530)]
Rollup merge of #22674 - untitaker:issue22243, r=alexcrichton

   "body": null,

9 years agoRollup merge of #22670 - shepmaster:c_str_typos, r=Manishearth
Manish Goregaokar [Mon, 23 Feb 2015 09:15:18 +0000 (14:45 +0530)]
Rollup merge of #22670 - shepmaster:c_str_typos, r=Manishearth

9 years agoRollup merge of #22662 - iKevinY:readme-changes, r=steveklabnik
Manish Goregaokar [Mon, 23 Feb 2015 09:15:11 +0000 (14:45 +0530)]
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.

9 years agoRollup merge of #22660 - achernya:tuple-reference, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:15:05 +0000 (14:45 +0530)]
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.

9 years agoRollup merge of #22658 - glacjay:issue-22535, r=Gankro
Manish Goregaokar [Mon, 23 Feb 2015 09:14:59 +0000 (14:44 +0530)]
Rollup merge of #22658 - glacjay:issue-22535, r=Gankro

 fix issue #22535

9 years agoRollup merge of #22652 - tigarmo:patch-1, r=Manishearth
Manish Goregaokar [Mon, 23 Feb 2015 09:14:53 +0000 (14:44 +0530)]
Rollup merge of #22652 - tigarmo:patch-1, r=Manishearth

 Update from straight line to reference-style link.

9 years agoRollup merge of #22643 - fhartwig:bitvec-doc-fix, r=alexcrichton
Manish Goregaokar [Mon, 23 Feb 2015 09:14:47 +0000 (14:44 +0530)]
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.

9 years agoRollup merge of #22613 - nick29581:fix-save-alias, r=huonw
Manish Goregaokar [Mon, 23 Feb 2015 09:14:40 +0000 (14:44 +0530)]
Rollup merge of #22613 - nick29581:fix-save-alias, r=huonw

 r? @huonw

9 years agoRollup merge of #22612 - jxcl:iter-replace, r=steveklabnik
Manish Goregaokar [Mon, 23 Feb 2015 09:14:34 +0000 (14:44 +0530)]
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()`.

9 years agoRollup merge of #22601 - bombless:patch-1, r=Manishearth
Manish Goregaokar [Mon, 23 Feb 2015 09:14:29 +0000 (14:44 +0530)]
Rollup merge of #22601 - bombless:patch-1, r=Manishearth

 r? @steveklabnik

9 years agoRollup merge of #22593 - brson:spatch, r=steveklabnik
Manish Goregaokar [Mon, 23 Feb 2015 09:14:23 +0000 (14:44 +0530)]
Rollup merge of #22593 - brson:spatch, r=steveklabnik

 r? @steveklabnik

9 years agoRollup merge of #22559 - kmcallister:borrowck-readme, r=nikomatsakis
Manish Goregaokar [Mon, 23 Feb 2015 09:14:17 +0000 (14:44 +0530)]
Rollup merge of #22559 - kmcallister:borrowck-readme, r=nikomatsakis

 And minor fixes to other docs.

r? @nikomatsakis

9 years agoRollup merge of #22556 - brson:str, r=steveklabnik
Manish Goregaokar [Mon, 23 Feb 2015 09:14:12 +0000 (14:44 +0530)]
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

9 years agoRollup merge of #22514 - diamondman:intro_doc_threading, r=steveklabnik
Manish Goregaokar [Mon, 23 Feb 2015 09:14:06 +0000 (14:44 +0530)]
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.

9 years agoRollup merge of #22513 - steveklabnik:doc_str, r=brson
Manish Goregaokar [Mon, 23 Feb 2015 09:14:01 +0000 (14:44 +0530)]
Rollup merge of #22513 - steveklabnik:doc_str, r=brson

9 years agoRollup merge of #22505 - tshepang:current_dir, r=steveklabnik
Manish Goregaokar [Mon, 23 Feb 2015 09:13:55 +0000 (14:43 +0530)]
Rollup merge of #22505 - tshepang:current_dir, r=steveklabnik

9 years agotest: Make two tests less flaky on windows
Alex Crichton [Mon, 23 Feb 2015 17:53:03 +0000 (09:53 -0800)]
test: Make two tests less flaky on windows

If these tests exit while a thread is panicking it often leads to situations
like #22628.

9 years agoInteger audit in `libstd/thread_local/*`, part of #22240
Vojtech Kral [Mon, 23 Feb 2015 16:24:50 +0000 (17:24 +0100)]
Integer audit in `libstd/thread_local/*`, part of #22240

9 years agoStatic and dynamic dispatch: missing word
Steve Klabnik [Mon, 23 Feb 2015 16:27:11 +0000 (11:27 -0500)]
Static and dynamic dispatch: missing word

9 years agodoc: Fix `target_{word_size,pointer_width}` renaming
lummax [Mon, 23 Feb 2015 13:53:16 +0000 (14:53 +0100)]
doc: Fix `target_{word_size,pointer_width}` renaming

Update the reference page to the change in #20680.

9 years agoRollup merge of #22371 - fhahn:issue-17829-compiletest-nocapture, r=Manishearth
Manish Goregaokar [Mon, 23 Feb 2015 09:13:44 +0000 (14:43 +0530)]
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.

9 years agoRollup merge of #22270 - steveklabnik:gh22152, r=huonw
Manish Goregaokar [Mon, 23 Feb 2015 09:13:38 +0000 (14:43 +0530)]
Rollup merge of #22270 - steveklabnik:gh22152, r=huonw

 Fixes #22152

9 years agoint audit - std::sync
Nick Cameron [Mon, 23 Feb 2015 04:16:46 +0000 (17:16 +1300)]
int audit - std::sync

9 years agoint audit core::hash
Nick Cameron [Mon, 23 Feb 2015 03:12:40 +0000 (16:12 +1300)]
int audit core::hash

9 years agoint audit - libcore::fmt
Nick Cameron [Mon, 23 Feb 2015 03:07:38 +0000 (16:07 +1300)]
int audit - libcore::fmt

9 years agoAuto merge of #21769 - brooksbp:column-line-macro, r=nick29581
bors [Mon, 23 Feb 2015 01:53:38 +0000 (01:53 +0000)]
Auto merge of #21769 - brooksbp:column-line-macro, r=nick29581

Please see discussion in #19284 .

9 years agoChange int to i32 in Cow example.
Scott Olson [Sun, 22 Feb 2015 00:43:11 +0000 (19:43 -0500)]
Change int to i32 in Cow example.

9 years agoFixed erroneous statements in iterators.md.
Alexander Bliskovsky [Mon, 23 Feb 2015 01:06:25 +0000 (20:06 -0500)]
Fixed erroneous statements in iterators.md.

9 years agoSwitch to &vector notation in the iterators chapter.
Alexander Bliskovsky [Sat, 21 Feb 2015 02:30:43 +0000 (21:30 -0500)]
Switch to &vector notation in the iterators chapter.

9 years agoUse boxed functions instead of transmute
Stepan Koltsov [Sun, 22 Feb 2015 23:58:22 +0000 (02:58 +0300)]
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.

9 years agoboxed: mark from_raw and into_raw functions inline
Stepan Koltsov [Sun, 22 Feb 2015 23:58:54 +0000 (02:58 +0300)]
boxed: mark from_raw and into_raw functions inline

9 years agoruntest: update slicing syntax where [] becomes [..]
Tshepang Lekhonkhobe [Sun, 22 Feb 2015 23:49:07 +0000 (01:49 +0200)]
runtest: update slicing syntax where [] becomes [..]

9 years agoboxed: fix typo in doc
Stepan Koltsov [Sun, 22 Feb 2015 23:25:47 +0000 (02:25 +0300)]
boxed: fix typo in doc

9 years agosave-analysis: fix impls on primitive types
Nick Cameron [Sun, 22 Feb 2015 23:15:11 +0000 (12:15 +1300)]
save-analysis: fix impls on primitive types

9 years agoAuto merge of #22466 - Kimundi:str_pattern_ai_safe, r=aturon
bors [Sun, 22 Feb 2015 22:45:46 +0000 (22:45 +0000)]
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]

9 years agorustbook: update slicing syntax where [] --> [..]
Tshepang Lekhonkhobe [Sun, 22 Feb 2015 22:20:42 +0000 (00:20 +0200)]
rustbook: update slicing syntax where [] --> [..]

9 years agoUpdate intro.md to fix thread spawning example Closes #22419
Jessy Diamond Exum [Fri, 13 Feb 2015 20:13:28 +0000 (12:13 -0800)]
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.

9 years agosave-analysis: handle type defs in struct patterns
Nick Cameron [Thu, 19 Feb 2015 03:10:35 +0000 (16:10 +1300)]
save-analysis: handle type defs in struct patterns