]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoAuto merge of #25907 - tshepang:patch-8, r=Gankro
bors [Sun, 31 May 2015 23:13:26 +0000 (23:13 +0000)]
Auto merge of #25907 - tshepang:patch-8, r=Gankro

9 years agoAuto merge of #25911 - olombard:borrowing-link, r=alexcrichton
bors [Sun, 31 May 2015 21:40:47 +0000 (21:40 +0000)]
Auto merge of #25911 - olombard:borrowing-link, r=alexcrichton

r? @steveklabnik

9 years agoAuto merge of #25908 - bluss:arc-mark-unsafe, r=sfackler
bors [Sun, 31 May 2015 20:07:49 +0000 (20:07 +0000)]
Auto merge of #25908 - bluss:arc-mark-unsafe, r=sfackler

Mark Arc function get_mut and method make_unique unsafe

This is a temporary mitigation for issue #24880 which points out that
these functions are racy in a particular situation where weak pointers
exist.

To mitigate this, mark the functions unsafe until this can be fixed or
another decision is made.

9 years agoAuto merge of #25927 - stevegury:patch-1, r=steveklabnik
bors [Sun, 31 May 2015 17:39:26 +0000 (17:39 +0000)]
Auto merge of #25927 - stevegury:patch-1, r=steveklabnik

`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)

9 years agoUpdate iterators.md
Steve Gury [Sun, 31 May 2015 17:24:30 +0000 (10:24 -0700)]
Update iterators.md

Fix the actual off by one

9 years agoFix off by one in the iterator documentation
Steve Gury [Sun, 31 May 2015 14:32:21 +0000 (07:32 -0700)]
Fix off by one in the iterator documentation

`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)

9 years agoAuto merge of #25921 - eddyb:inline-calculate-offsets, r=Aatch
bors [Sun, 31 May 2015 09:53:49 +0000 (09:53 +0000)]
Auto merge of #25921 - eddyb:inline-calculate-offsets, r=Aatch

The `HashMap` and `HashSet` iterators use `RawTable::first_bucket_raw` which is generic and will get inlined cross-crate.
However, `first_bucket_raw` calls `calculate_offsets` and the call doesn't get inlined, despite being a simple function.
This missing `#[inline]` results in `hash_table::calculate_offsets` showing up at the top of a callgrind profile with 3 million calls (for the testcase in #25916).

9 years agoInline hash_table::calculate_offsets, used by iterators.
Eduard Burtescu [Sun, 31 May 2015 08:03:46 +0000 (11:03 +0300)]
Inline hash_table::calculate_offsets, used by iterators.

The `HashMap` and `HashSet` iterators use `RawTable::first_bucket_raw` which is generic and will get inlined cross-crate.
However, `first_bucket_raw` calls `calculate_offsets` and the call doesn't get inlined, despite being a simple function.
This missing `#[inline]` results in `hash_table::calculate_offsets` showing up at the top of a callgrind profile with 3 million calls (for the testcase in #25916).

9 years agoAuto merge of #25914 - andars:master, r=sanxiyn
bors [Sun, 31 May 2015 07:29:25 +0000 (07:29 +0000)]
Auto merge of #25914 - andars:master, r=sanxiyn

Previous:
```
    --disable-llvm-version-check     don't don't check if the LLVM version is supported, build anyway
```

New:
```
    --disable-llvm-version-check     don't check if the LLVM version is supported, build anyway
```

9 years agoremove duplicate "don't"
Andrew Foote [Sun, 31 May 2015 01:12:32 +0000 (18:12 -0700)]
remove duplicate "don't"

9 years agoTRPL: Fix a broken link to 'borrowing'
olombard [Sat, 30 May 2015 21:43:23 +0000 (23:43 +0200)]
TRPL: Fix a broken link to 'borrowing'

9 years agoAuto merge of #25882 - steveklabnik:gh25554, r=alexcrichton
bors [Sat, 30 May 2015 21:10:07 +0000 (21:10 +0000)]
Auto merge of #25882 - steveklabnik:gh25554, r=alexcrichton

Fixes #25554

9 years agoMark Arc function get_mut and method make_unique unsafe
Ulrik Sverdrup [Sat, 30 May 2015 20:03:57 +0000 (22:03 +0200)]
Mark Arc function get_mut and method make_unique unsafe

This is a temporary mitigation for issue #24880 which points out that
these functions are racy in a particular situation where weak pointers
exist.

To mitigate this, mark the functions unsafe until this can be fixed or
another decision is made.

This is a breaking change to unstable API, because the new version
requires an `unsafe` block. Review carefully if weak pointers may race
for any uses of this API and consider abandoning it.

[breaking-change]

9 years agodoc: be more clear/explicit that we got String type
Tshepang Lekhonkhobe [Sat, 30 May 2015 19:21:56 +0000 (21:21 +0200)]
doc: be more clear/explicit that we got String type

9 years agoAuto merge of #25904 - benaryorg:master, r=steveklabnik
bors [Sat, 30 May 2015 17:09:53 +0000 (17:09 +0000)]
Auto merge of #25904 - benaryorg:master, r=steveklabnik

perhaps the smallest and least useful fix in the whole history of rust

I will not blame you if you do not want to merge it

9 years agofix documentation in libserialize
benaryorg [Sat, 30 May 2015 15:41:09 +0000 (17:41 +0200)]
fix documentation in libserialize

the object was serialized with an 'i' but the comment stated the print command
would output 'j'

9 years agoAuto merge of #25818 - sfackler:socket-timeouts, r=alexcrichton
bors [Sat, 30 May 2015 04:20:20 +0000 (04:20 +0000)]
Auto merge of #25818 - sfackler:socket-timeouts, r=alexcrichton

Closes #25619

r? @alexcrichton

9 years agoLoosen timeout restrictions
Steven Fackler [Sat, 30 May 2015 02:09:29 +0000 (19:09 -0700)]
Loosen timeout restrictions

9 years agoAuto merge of #25817 - XMPPwocky:once_cleanedup, r=alexcrichton
bors [Sat, 30 May 2015 01:12:35 +0000 (01:12 +0000)]
Auto merge of #25817 - XMPPwocky:once_cleanedup, r=alexcrichton

Closes #24443.

9 years agoAuto merge of #25888 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 29 May 2015 21:00:26 +0000 (21:00 +0000)]
Auto merge of #25888 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #25788, #25861, #25864, #25865, #25866, #25873, #25876, #25883, #25886
- Failed merges:

9 years agoRollup merge of #25886 - nhowell:patch-1, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25886 - nhowell:patch-1, r=steveklabnik

r? @steveklabnik

9 years agoRollup merge of #25883 - steveklabnik:gh25417, r=alexcrichton
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25883 - steveklabnik:gh25417, r=alexcrichton

Fixes #25417

9 years agoRollup merge of #25876 - tshepang:patch-3, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25876 - tshepang:patch-3, r=steveklabnik

9 years agoRollup merge of #25873 - nham:update_E0015, r=Aatch
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25873 - nham:update_E0015, r=Aatch

The E0397 explanation, as I've written it, isn't really an explanation, but I'm not sure what to put here. I will happily take suggestions.

Partially addresses https://github.com/rust-lang/rust/issues/25851

9 years agoRollup merge of #25866 - jooert:update_guidelines, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:47 +0000 (15:24 -0400)]
Rollup merge of #25866 - jooert:update_guidelines, r=steveklabnik

So that rust-guidelines can be deleted and src/doc/style can prosper as the official home of the rust guidelines. :smiley:

9 years agoRollup merge of #25865 - azerupi:patch-2, r=alexcrichton
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25865 - azerupi:patch-2, r=alexcrichton

"workd" corrected to "world"

9 years agoRollup merge of #25864 - azerupi:patch-1, r=alexcrichton
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25864 - azerupi:patch-1, r=alexcrichton

There was no opening parenthesis for this closing parenthesis...

9 years agoRollup merge of #25861 - tringenbach:master, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25861 - tringenbach:master, r=steveklabnik

This adds an example from mem::swap, and provides some suggested uses of this
function.

This is my attempt to summarize the answers to a question I asked on reddit http://www.reddit.com/r/rust/comments/37jcul/what_is_forget_for/ and add the answers to the documentation so that no one else has to google or ask the question again.

9 years agoRollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r=steveklabnik
Steve Klabnik [Fri, 29 May 2015 19:24:46 +0000 (15:24 -0400)]
Rollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r=steveklabnik

r? @steveklabnik

9 years agoAuto merge of #25494 - alexcrichton:stdio-from-raw, r=aturon
bors [Fri, 29 May 2015 19:24:40 +0000 (19:24 +0000)]
Auto merge of #25494 - alexcrichton:stdio-from-raw, r=aturon

This commit implements a number of standard traits for the standard library's
process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the
`Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the
`Child{Stdout,Stdin,Stderr}` types.

The stability markers for these implementations mention that they are stable for
1.1 as I will nominate this commit for cherry-picking to beta.

9 years agoImplement RFC 771: std::iter::once
Nathaniel Theis [Tue, 26 May 2015 23:39:18 +0000 (16:39 -0700)]
Implement RFC 771: std::iter::once

9 years agoImprove mem::forget documentation
Tim Ringenbach [Thu, 28 May 2015 18:04:17 +0000 (13:04 -0500)]
Improve mem::forget documentation

This adds an example from mem::swap, and provides some suggested uses of this
function.

Change wording on comment on forget line to be more specific as to why we
need to call forget.

This breaks the examples up into three pieces. The last piece isn't
compiling for some reason.

9 years agotrpl: eight sections, not seven
Nick Howell [Fri, 29 May 2015 18:29:35 +0000 (14:29 -0400)]
trpl: eight sections, not seven

9 years agoAuto merge of #25880 - nikomatsakis:const-fn-feature-gate-calls, r=alexcrichton
bors [Fri, 29 May 2015 17:38:40 +0000 (17:38 +0000)]
Auto merge of #25880 - nikomatsakis:const-fn-feature-gate-calls, r=alexcrichton

The previous feature gate assumed we would not define any (stable) const fns. But then @eddyb went and cleaned up the code. So this now extends the feature-gate to prohibit calls; but calls inside of macros are considered ok.

r? @alexcrichton

9 years agoAdd syntax for multiple lifetimes
Steve Klabnik [Fri, 29 May 2015 16:37:18 +0000 (12:37 -0400)]
Add syntax for multiple lifetimes

Fixes #25417

9 years agoMake note about $ more prominent.
Steve Klabnik [Fri, 29 May 2015 16:20:32 +0000 (12:20 -0400)]
Make note about $ more prominent.

Fixes #25554

9 years agoNew tests for cross-crate usages of const fn and so forth
Niko Matsakis [Fri, 29 May 2015 13:57:36 +0000 (09:57 -0400)]
New tests for cross-crate usages of const fn and so forth

9 years agoFix windows recvfrom definition
Steven Fackler [Fri, 29 May 2015 07:21:33 +0000 (00:21 -0700)]
Fix windows recvfrom definition

9 years agoSkip timeout upper bound check on windows
Steven Fackler [Fri, 29 May 2015 07:21:06 +0000 (00:21 -0700)]
Skip timeout upper bound check on windows

9 years agoAuto merge of #25857 - killercup:patch-14, r=steveklabnik
bors [Fri, 29 May 2015 14:53:59 +0000 (14:53 +0000)]
Auto merge of #25857 - killercup:patch-14, r=steveklabnik

Thanks to @cers who reported this in killercup/trpl-ebook#14!

r? @steveklabnik

9 years agoadd const_fn features
Niko Matsakis [Fri, 29 May 2015 13:42:32 +0000 (09:42 -0400)]
add const_fn features

9 years agoadd a test for const fn methods, as suggested by @pnkfelix
Niko Matsakis [Thu, 28 May 2015 19:20:32 +0000 (15:20 -0400)]
add a test for const fn methods, as suggested by @pnkfelix

9 years agopermit const-fn in macro expansions
Niko Matsakis [Thu, 28 May 2015 19:18:47 +0000 (15:18 -0400)]
permit const-fn in macro expansions

9 years agoAdd feature-gate to calling const fn
Niko Matsakis [Thu, 28 May 2015 15:22:00 +0000 (11:22 -0400)]
Add feature-gate to calling const fn

9 years agoAuto merge of #25760 - Ms2ger:tagged_docs, r=Manishearth
bors [Fri, 29 May 2015 13:19:46 +0000 (13:19 +0000)]
Auto merge of #25760 - Ms2ger:tagged_docs, r=Manishearth

9 years agoAuto merge of #25854 - liigo:patch-1, r=alexcrichton
bors [Fri, 29 May 2015 11:46:08 +0000 (11:46 +0000)]
Auto merge of #25854 - liigo:patch-1, r=alexcrichton

9 years agoAuto merge of #25838 - mbrubeck:doc-edit, r=steveklabnik
bors [Fri, 29 May 2015 10:13:05 +0000 (10:13 +0000)]
Auto merge of #25838 - mbrubeck:doc-edit, r=steveklabnik

Fixes #25622. r? @steveklabnik

9 years agoremove the last mention of IoResult
Tshepang Lekhonkhobe [Fri, 29 May 2015 08:58:39 +0000 (10:58 +0200)]
remove the last mention of IoResult

9 years agoAuto merge of #25830 - steveklabnik:debug_docs, r=alexcrichton
bors [Fri, 29 May 2015 08:40:20 +0000 (08:40 +0000)]
Auto merge of #25830 - steveklabnik:debug_docs, r=alexcrichton

9 years agoAuto merge of #25747 - SimonSapin:map_ref, r=alexcrichton
bors [Fri, 29 May 2015 07:07:07 +0000 (07:07 +0000)]
Auto merge of #25747 - SimonSapin:map_ref, r=alexcrichton

For slightly complex data structures like `rustc_serialize::json::Json`, it is often convenient to have helper methods like `Json::as_string(&self) -> Option<&str>`  that return a borrow of some component of `&self`.

However, when `RefCell`s are involved, keeping a `Ref` around is required to hold a borrow to the insides of a `RefCell`. But `Ref` so far only references the entirety of the contents of a `RefCell`, not a component. But there is no reason it couldn’t: `Ref` internally contains just a data reference and a borrow count reference. The two can be dissociated.

This adds a `map_ref` function that creates a new `Ref` for some other data, but borrowing the same `RefCell` as an existing `Ref`.

Example:

```rust
struct RefCellJson(RefCell<Json>);

impl RefCellJson {
    fn as_string(&self) -> Option<Ref<str>> {
        map_ref(self.borrow(), |j| j.as_string())
    }
}
```

r? @alexcrichton

9 years agoAdd map and filter_map associated functions to std::cell::Ref and RefMut
Simon Sapin [Thu, 28 May 2015 21:00:52 +0000 (23:00 +0200)]
Add map and filter_map associated functions to std::cell::Ref and RefMut

See design discussion in https://github.com/rust-lang/rust/pull/25747

9 years agoAuto merge of #25832 - edunham:document-gh-issue-tags, r=alexcrichton
bors [Fri, 29 May 2015 05:34:28 +0000 (05:34 +0000)]
Auto merge of #25832 - edunham:document-gh-issue-tags, r=alexcrichton

I took a guess at what they mean, but could be totally wrong. Please comment, and I'll update the PR with corrections!

9 years agoImplement RFC 1047 - socket timeouts
Steven Fackler [Wed, 27 May 2015 06:47:03 +0000 (23:47 -0700)]
Implement RFC 1047 - socket timeouts

Closes #25619

9 years agoChange E0015 and E0378 explanations to link to text of RFC 911, not rfc PR.
Nick Hamann [Fri, 29 May 2015 02:12:46 +0000 (21:12 -0500)]
Change E0015 and E0378 explanations to link to text of RFC 911, not rfc PR.

9 years agoRevise E0015 according to feedback.
Nick Hamann [Fri, 29 May 2015 02:02:13 +0000 (21:02 -0500)]
Revise E0015 according to feedback.

9 years agoAuto merge of #25816 - sfackler:io-error-delegation, r=alexcrichton
bors [Fri, 29 May 2015 01:09:48 +0000 (01:09 +0000)]
Auto merge of #25816 - sfackler:io-error-delegation, r=alexcrichton

The first commit simply forwards `io::Error`'s `cause` implementation to the inner error.

The second commit adds accessor methods for the inner error. Method names mirror those used elsewhere like `BufReader`.

r? @alexcrichton

9 years agoConvert mutable statics error to have error code and add explanation.
Nick Hamann [Thu, 28 May 2015 18:11:05 +0000 (13:11 -0500)]
Convert mutable statics error to have error code and add explanation.

Also changes 'owned pointers' => 'boxes' in the error message.

9 years agoFix link to newtypes page
Nils Liberg [Sat, 23 May 2015 15:31:57 +0000 (17:31 +0200)]
Fix link to newtypes page

9 years agoFix mistake: "to to" -> "to"
Nils Liberg [Sat, 23 May 2015 09:19:11 +0000 (11:19 +0200)]
Fix mistake: "to to" -> "to"

9 years agoremove extra space from "over" code as well
David Campbell [Mon, 30 Mar 2015 22:35:17 +0000 (18:35 -0400)]
remove extra space from "over" code as well

9 years agoUpdate let.md -- follow whitespace style guideline
David Campbell [Mon, 30 Mar 2015 22:31:42 +0000 (18:31 -0400)]
Update let.md -- follow whitespace style guideline

"Idiomatic code should not use extra whitespace in the middle of a line to provide alignment."

9 years agoMake adjancent code examples more similar
Corey Farwell [Sat, 21 Feb 2015 15:53:42 +0000 (10:53 -0500)]
Make adjancent code examples more similar

9 years agoadd newline before list in functions-and-methods
David Campbell [Sat, 14 Feb 2015 19:17:03 +0000 (14:17 -0500)]
add newline before list in functions-and-methods

The current version of hoedown treats lists interrupting paragraphs in the Markdown.pl style rather than CommonMark, so a newline is needed for the list to be rendered properly.

9 years agoDocument issue tracker tags
edunham [Wed, 27 May 2015 14:29:02 +0000 (07:29 -0700)]
Document issue tracker tags

A discussion at https://github.com/rust-lang/rust/pull/25832 established what
the abbreviations mean.

9 years agoAdd error explanations for E0040, E0087, E0378, E0379, E0394.
Nick Hamann [Wed, 27 May 2015 19:07:20 +0000 (14:07 -0500)]
Add error explanations for E0040, E0087, E0378, E0379, E0394.

9 years agoUpdate E0015 explanation, fix E0053.
Nick Hamann [Wed, 27 May 2015 17:55:33 +0000 (12:55 -0500)]
Update E0015 explanation, fix E0053.

9 years agoCorrected typo
Mathieu David [Thu, 28 May 2015 22:43:39 +0000 (00:43 +0200)]
Corrected typo

"workd" corrected to "world"

9 years agoAuto merge of #25744 - SimonSapin:cell-eq, r=alexcrichton
bors [Thu, 28 May 2015 21:48:40 +0000 (21:48 +0000)]
Auto merge of #25744 - SimonSapin:cell-eq, r=alexcrichton

`core::cell::Cell<T>` and `core::cell::RefCell<T>` currently implement `PartialEq` when `T` does, and just defer to comparing `T` values. There is no reason the same shouldn’t apply to `Eq`.

This enables `#[derive(Eq, PartialEq)]` on e.g. structs that have a `RefCell` field.

r? @alexcrichton

I’m unsure what to do with `#[stable]` attributes on `impl`s. `impl`s generated by `#[derive]` don’t have them.

9 years agoremoved lonely closing parenthesis
Mathieu David [Thu, 28 May 2015 21:47:27 +0000 (23:47 +0200)]
removed lonely closing parenthesis

There was no opening parenthesis for this closing parenthesis...

9 years agoMove std::cell::clone_ref to a clone associated function on std::cell::Ref
Simon Sapin [Thu, 28 May 2015 20:58:04 +0000 (22:58 +0200)]
Move std::cell::clone_ref to a clone associated function on std::cell::Ref

... and generalize the bounds on the value type.

9 years agoAuto merge of #25856 - bluss:binary-heap-hole, r=Gankro
bors [Thu, 28 May 2015 20:16:08 +0000 (20:16 +0000)]
Auto merge of #25856 - bluss:binary-heap-hole, r=Gankro

collections: Make BinaryHeap panic safe in sift_up / sift_down

Use a struct called Hole that keeps track of an invalid location
in the vector and fills the hole on drop.

I include a run-pass test that the current BinaryHeap fails, and the new
one passes.

NOTE: The BinaryHeap will still be inconsistent after a comparison fails. It will
not have the heap property. What we fix is just that elements will be valid
values.

This is actually a performance win -- the new code does not bother to write in `zeroed()`
values in the holes, it just leaves them as they were.

Net result is something like a 5% decrease in runtime for `BinaryHeap::from_vec`. This
can be further improved by using unchecked indexing (I confirmed it makes a difference,
not a surprise with the non-sequential access going on), but let's leave that for another PR.
Safety first :wink:

Fixes #25842

9 years agoImprove Debug documentation
Steve Klabnik [Wed, 27 May 2015 18:28:07 +0000 (14:28 -0400)]
Improve Debug documentation

9 years agocollections: Make BinaryHeap panic safe in sift_up / sift_down
Ulrik Sverdrup [Thu, 28 May 2015 08:44:31 +0000 (10:44 +0200)]
collections: Make BinaryHeap panic safe in sift_up / sift_down

Use a struct called Hole that keeps track of an invalid location
in the vector and fills the hole on drop.

I include a run-pass test that the current BinaryHeap fails, and the new
one passes.

Fixes #25842

9 years agoMention UFCS sadness in instability messages
Steven Fackler [Thu, 28 May 2015 17:34:40 +0000 (10:34 -0700)]
Mention UFCS sadness in instability messages

9 years agoAuto merge of #25829 - steveklabnik:ioresult_fixes, r=alexcrichton
bors [Thu, 28 May 2015 17:34:30 +0000 (17:34 +0000)]
Auto merge of #25829 - steveklabnik:ioresult_fixes, r=alexcrichton

This is now std::io::Result

9 years agoReturn a TaggedDocsIterator from each_reexport.
Ms2ger [Wed, 27 May 2015 05:26:35 +0000 (22:26 -0700)]
Return a TaggedDocsIterator from each_reexport.

9 years agoremove references to IoResult
Steve Klabnik [Wed, 27 May 2015 18:15:24 +0000 (14:15 -0400)]
remove references to IoResult

This is now std::io::Result

9 years agoAuto merge of #25835 - steveklabnik:gh25438, r=alexcrichton
bors [Thu, 28 May 2015 15:29:15 +0000 (15:29 +0000)]
Auto merge of #25835 - steveklabnik:gh25438, r=alexcrichton

Fixes #25438

9 years agoTRPL: Fix Unescaped URL
Pascal Hertleif [Thu, 28 May 2015 14:18:26 +0000 (16:18 +0200)]
TRPL: Fix Unescaped URL

9 years agoAuto merge of #25834 - steveklabnik:gh25326, r=alexcrichton
bors [Thu, 28 May 2015 13:57:36 +0000 (13:57 +0000)]
Auto merge of #25834 - steveklabnik:gh25326, r=alexcrichton

Fixes #25326

9 years agoAuto merge of #25849 - reinh:patch-1, r=huonw
bors [Thu, 28 May 2015 11:24:38 +0000 (11:24 +0000)]
Auto merge of #25849 - reinh:patch-1, r=huonw

Thanks for the awesome book!

r? @steveklabnik

9 years agofloating-point types are machine types, not machine-dependent types
Liigo Zhuang [Thu, 28 May 2015 10:11:32 +0000 (18:11 +0800)]
floating-point types are machine types, not machine-dependent types

9 years agoAuto merge of #25843 - shepmaster:remove-public-int-and-uint, r=huonw
bors [Thu, 28 May 2015 09:20:49 +0000 (09:20 +0000)]
Auto merge of #25843 - shepmaster:remove-public-int-and-uint, r=huonw

9 years agoAuto merge of #25783 - nrc:save-api-2, r=@huonw
bors [Thu, 28 May 2015 06:54:57 +0000 (06:54 +0000)]
Auto merge of #25783 - nrc:save-api-2, r=@huonw

A little more work on the save-analysis API.

r? @huonw

9 years agoAdd a test for downcasting
Steven Fackler [Thu, 28 May 2015 06:03:04 +0000 (23:03 -0700)]
Add a test for downcasting

Ergonomics are a bit crappy right now because method resolution isn't
smart enough to drop bounds, unfortunately.

9 years agoTRPL: fix typo, borow for borrow
Rein Henrichs [Thu, 28 May 2015 05:35:46 +0000 (22:35 -0700)]
TRPL: fix typo, borow for borrow

9 years agosave-analysis: move another couple of things to the API
Nick Cameron [Mon, 25 May 2015 22:35:53 +0000 (10:35 +1200)]
save-analysis: move another couple of things to the API

9 years agoAdd accessors for io::Error's inner error.
Steven Fackler [Wed, 27 May 2015 04:06:56 +0000 (21:06 -0700)]
Add accessors for io::Error's inner error.

error::Error itself has downcasting methods, so there's no need to
duplicate those here.

9 years agoDelegate io::Error::cause to inner error
Steven Fackler [Wed, 27 May 2015 03:39:14 +0000 (20:39 -0700)]
Delegate io::Error::cause to inner error

9 years agoAuto merge of #25840 - arielb1:ptr-compare-fixes, r=nrc
bors [Thu, 28 May 2015 03:51:58 +0000 (03:51 +0000)]
Auto merge of #25840 - arielb1:ptr-compare-fixes, r=nrc

Fixes #25826.

9 years agoAuto merge of #25824 - alexcrichton:fix-deadlocking-test-on-windows, r=nikomatsakis
bors [Thu, 28 May 2015 02:17:48 +0000 (02:17 +0000)]
Auto merge of #25824 - alexcrichton:fix-deadlocking-test-on-windows, r=nikomatsakis

Windows tests can often deadlock if a child thread continues after the main
thread and then panics, and a `println!` executed in a child thread after the
main thread has exited is at risk of panicking.

9 years agoPrevent comparison and dereferencing of raw pointers in constexprs
Ariel Ben-Yehuda [Wed, 27 May 2015 21:35:56 +0000 (00:35 +0300)]
Prevent comparison and dereferencing of raw pointers in constexprs

Fixes #25826.

9 years agoAuto merge of #25805 - jooert:colorized_tests, r=alexcrichton
bors [Thu, 28 May 2015 00:15:47 +0000 (00:15 +0000)]
Auto merge of #25805 - jooert:colorized_tests, r=alexcrichton

The output of individual tests can be captured now so it's safe to use
colorized output even when running tests in parallel. Closes #782.

9 years agoRemove mentions of int / uint from public documentation
Jake Goulding [Wed, 27 May 2015 23:20:32 +0000 (19:20 -0400)]
Remove mentions of int / uint from public documentation

9 years agoRemove mentions of int / uint from the isize / usize docs
Jake Goulding [Wed, 27 May 2015 23:16:00 +0000 (19:16 -0400)]
Remove mentions of int / uint from the isize / usize docs

9 years agoAuto merge of #25796 - arielb1:default-assoc, r=eddyb
bors [Wed, 27 May 2015 22:05:09 +0000 (22:05 +0000)]
Auto merge of #25796 - arielb1:default-assoc, r=eddyb

r? @eddyb

Fixes #19476.

9 years agoAuto merge of #25827 - Manishearth:rollup, r=Manishearth
bors [Wed, 27 May 2015 19:42:48 +0000 (19:42 +0000)]
Auto merge of #25827 - Manishearth:rollup, r=Manishearth

- Successful merges: #25128, #25651, #25668, #25726, #25760, #25792, #25806, #25807
- Failed merges:

9 years agoRollup merge of #25807 - rillian:manpages, r=alexcrichton
Manish Goregaokar [Wed, 27 May 2015 16:38:54 +0000 (22:08 +0530)]
Rollup merge of #25807 - rillian:manpages, r=alexcrichton

Quick update to fix two manpage issues I noticed in #25689.

9 years agoRollup merge of #25806 - nrc:20184-msg, r=alexcrichton
Manish Goregaokar [Wed, 27 May 2015 16:38:54 +0000 (22:08 +0530)]
Rollup merge of #25806 - nrc:20184-msg, r=alexcrichton

Closes #20184

9 years agoRollup merge of #25792 - koobs:patch-1, r=alexcrichton
Manish Goregaokar [Wed, 27 May 2015 16:38:54 +0000 (22:08 +0530)]
Rollup merge of #25792 - koobs:patch-1, r=alexcrichton

Currently, there are two conditional blocks that exist to check for "clang or gcc"

On line 866:

```
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
then
    err "either clang or gcc is required"
fi
```
and on line 1019:

```
if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
then
    err "either clang or gcc is required"
fi
```

Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set.

The expected behaviour is to honour user-flags, in this case CC.

Aside from removing all hand-holdy compiler checks in favour of actual compiler *feature* checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour.