]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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 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 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 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 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.

9 years agoImprove docs for Vec::as_slice and as_mut_slice
Matt Brubeck [Wed, 27 May 2015 19:37:29 +0000 (12:37 -0700)]
Improve docs for Vec::as_slice and as_mut_slice

Fixes #25622.

9 years agoRollup merge of #25726 - nham:cell_docs, r=alexcrichton
Manish Goregaokar [Wed, 27 May 2015 16:38:53 +0000 (22:08 +0530)]
Rollup merge of #25726 - nham:cell_docs, r=alexcrichton

Currently part of the description of the `into_inner` method of `UnsafeCell` seems backwards.

9 years agoRollup merge of #25668 - steveklabnik:doc_const, r=alexcrichton
Manish Goregaokar [Wed, 27 May 2015 16:38:53 +0000 (22:08 +0530)]
Rollup merge of #25668 - steveklabnik:doc_const, r=alexcrichton

9 years agoRollup merge of #25128 - steveklabnik:gh24816, r=alexcrichton
Manish Goregaokar [Wed, 27 May 2015 16:38:52 +0000 (22:08 +0530)]
Rollup merge of #25128 - steveklabnik:gh24816, r=alexcrichton

Fixes #24816

r? @alexcrichton

9 years agoSmall wording fix in TRPL: lifetimes
Steve Klabnik [Wed, 27 May 2015 19:02:42 +0000 (15:02 -0400)]
Small wording fix in TRPL: lifetimes

Fixes #25438

9 years agofix example for E0018
Steve Klabnik [Wed, 27 May 2015 18:51:58 +0000 (14:51 -0400)]
fix example for E0018

Fixes #25326

9 years agoAddress review comments
Ariel Ben-Yehuda [Wed, 27 May 2015 17:42:42 +0000 (20:42 +0300)]
Address review comments

9 years agotest fixes
Ariel Ben-Yehuda [Wed, 27 May 2015 17:31:56 +0000 (20:31 +0300)]
test fixes

9 years agoAuto merge of #25799 - alexcrichton:fix-link-in-mk, r=luqmana
bors [Wed, 27 May 2015 17:25:00 +0000 (17:25 +0000)]
Auto merge of #25799 - alexcrichton:fix-link-in-mk, r=luqmana

The changes scaled back in 4cc025d8 were a little too aggressive and broke a
bunch of cross compilations by not defining the `LINK_$(1)` variable for all
targets. This commit ensures that the variable is defined for all targets by
defaulting it to the normal compiler if it's not already defined (it's only
defined specially for MSVC).

Closes #25723
Closes #25802

9 years agotest: Join child threads on windows in tests
Alex Crichton [Wed, 27 May 2015 16:15:19 +0000 (09:15 -0700)]
test: Join child threads on windows in tests

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 agoAuto merge of #25797 - eddyb:const-trait-to-trait, r=luqmana
bors [Wed, 27 May 2015 12:37:56 +0000 (12:37 +0000)]
Auto merge of #25797 - eddyb:const-trait-to-trait, r=luqmana

Fixes #24644.

9 years agoAuto merge of #25762 - dotdash:codegen_test, r=alexcrichton
bors [Wed, 27 May 2015 10:21:11 +0000 (10:21 +0000)]
Auto merge of #25762 - dotdash:codegen_test, r=alexcrichton

The current codegen tests only compare IR line counts between similar
rust and C programs, the latter getting compiled with clang. That looked
like a good idea back then, but actually things like lifetime intrinsics
mean that less IR isn't always better, so the metric isn't really
helpful.

Instead, we can start doing tests that check specific aspects of the
generated IR, like attributes or metadata. To do that, we can use LLVM's
FileCheck tool which has a number of useful features for such tests.

To start off, I created some tests for a few things that were recently
added and/or broken.

9 years agoRevamp codegen tests to check IR quality instead of quantity
Björn Steinbrink [Sun, 24 May 2015 16:07:52 +0000 (18:07 +0200)]
Revamp codegen tests to check IR quality instead of quantity

The current codegen tests only compare IR line counts between similar
rust and C programs, the latter getting compiled with clang. That looked
like a good idea back then, but actually things like lifetime intrinsics
mean that less IR isn't always better, so the metric isn't really
helpful.

Instead, we can start doing tests that check specific aspects of the
generated IR, like attributes or metadata. To do that, we can use LLVM's
FileCheck tool which has a number of useful features for such tests.

To start off, I created some tests for a few things that were recently
added and/or broken.

9 years agoAuto merge of #25790 - eddyb:oh-snap-ctfe-arrived, r=alexcrichton
bors [Wed, 27 May 2015 08:47:53 +0000 (08:47 +0000)]
Auto merge of #25790 - eddyb:oh-snap-ctfe-arrived, r=alexcrichton

9 years agoUse `const fn` to abstract away the contents of UnsafeCell & friends.
Eduard Burtescu [Wed, 27 May 2015 08:18:36 +0000 (11:18 +0300)]
Use `const fn` to abstract away the contents of UnsafeCell & friends.

9 years agoRemove #[cfg(stage0)] items.
Eduard Burtescu [Mon, 25 May 2015 17:21:29 +0000 (20:21 +0300)]
Remove #[cfg(stage0)] items.

9 years agoRegister snapshots (2015-05-24 ba0e1cd).
Eduard Burtescu [Mon, 25 May 2015 17:20:50 +0000 (20:20 +0300)]
Register snapshots (2015-05-24 ba0e1cd).

9 years agoAuto merge of #25791 - barosl:use-paths-as-items, r=alexcrichton
bors [Wed, 27 May 2015 07:14:45 +0000 (07:14 +0000)]
Auto merge of #25791 - barosl:use-paths-as-items, r=alexcrichton

Currently, for `use` declarations with multiple paths, only the `use` item itself is saved in the AST map, not the individual path nodes. This can lead to a problem when a span of a specific path node is needed.

For example, #24818 caused an ICE because of this, in `ImportResolver::check_for_conflicting_import()`.

Fixes #25763.

9 years agoAuto merge of #25749 - richo:python3, r=alexcrichton
bors [Wed, 27 May 2015 05:24:36 +0000 (05:24 +0000)]
Auto merge of #25749 - richo:python3, r=alexcrichton

This is enough to make `make tidy` work if you're using python3

There's definitely more stuff to do, but PR'ing now to avoid bitrot

9 years agoAuto merge of #25741 - richo:backtrace-message, r=alexcrichton
bors [Wed, 27 May 2015 02:15:44 +0000 (02:15 +0000)]
Auto merge of #25741 - richo:backtrace-message, r=alexcrichton

The second commit seems reasonable to me but I can remove if it's contentious. The first is purely cosmetic but has been irking me for ages.

9 years agoAuto merge of #25713 - Stebalien:pattern, r=alexcrichton
bors [Wed, 27 May 2015 00:42:55 +0000 (00:42 +0000)]
Auto merge of #25713 - Stebalien:pattern, r=alexcrichton

Needed to support:

```rust
match X {
  pattern if Y ...
}

for pattern in Y {}
```

IMO, this shouldn't require an RFC because it can't interfere with any future language changes (because `pattern if` and `pattern in` are already legal in rust) and can't cause any ambiguity.

9 years agoUpdate rustc manpage.
Ralph Giles [Tue, 26 May 2015 23:06:43 +0000 (16:06 -0700)]
Update rustc manpage.

rustc -C target-cpu=help is no longer supported. Recommend the
llc tool intead like 'rustc --help'.

9 years agoBump manpage date and version for 1.2.0-dev.
Ralph Giles [Tue, 26 May 2015 23:03:41 +0000 (16:03 -0700)]
Bump manpage date and version for 1.2.0-dev.

Estimating August as the release date for 1.2.0.

9 years agoAuto merge of #25688 - nham:E0055_E0192, r=alexcrichton
bors [Tue, 26 May 2015 23:10:06 +0000 (23:10 +0000)]
Auto merge of #25688 - nham:E0055_E0192, r=alexcrichton

 - Adds explanations for E0055, E0089, E0192, E0261-E0263, E0318
 - Improves explanations for E0250, E0368, E0372.
 - Converts 15 diagnostics to have error codes (E0380-E0394). Adds an explanation for E0380.
 - The E0087-E0090 messages currently look like "expected {} parameter(s) found {} parameter(s)". This changes them to either use "parameter" or "parameters", based on the number.

This is, in part, more progress towards #24407

9 years agoAdd note about filesystems to fs::rename
Steve Klabnik [Tue, 5 May 2015 20:30:13 +0000 (16:30 -0400)]
Add note about filesystems to fs::rename

Fixes #24816

9 years agoAdd a WONTFIX message to a failing test.
Nick Cameron [Tue, 26 May 2015 08:34:50 +0000 (20:34 +1200)]
Add a WONTFIX message to a failing test.

Closes #20184

9 years agoEnable colored test output when capturing output of tests
Johannes Oertel [Tue, 26 May 2015 21:46:55 +0000 (23:46 +0200)]
Enable colored test output when capturing output of tests

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 agoAuto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichton
bors [Tue, 26 May 2015 21:36:57 +0000 (21:36 +0000)]
Auto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichton

rustdoc: Associated type fixes

The first commit fixes a bug with "dud" items in the search index from
misrepresented `type` items in trait impl blocks.

For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.

There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).

Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.

The second commit fixes a bug that made signatures and where bounds
using associated types (if they were not on `Self`) incorrect.

The third commit fixes so that where clauses in type alias definititons
are shown.

Fixes #22442
Fixes #24417
Fixes #25769

9 years agoConvert 15 diagnostics to have error codes (E0380-E0394).
Nick Hamann [Tue, 19 May 2015 21:53:34 +0000 (16:53 -0500)]
Convert 15 diagnostics to have error codes (E0380-E0394).

Also adds explanations for E0380 and E0381.

9 years agoPluralize E0087-E0090 messages based on number of parameters.
Nick Hamann [Thu, 21 May 2015 18:33:31 +0000 (13:33 -0500)]
Pluralize E0087-E0090 messages based on number of parameters.

9 years agoFix typo.
Nick Hamann [Thu, 21 May 2015 06:17:50 +0000 (01:17 -0500)]
Fix typo.

9 years agoSmall improvements for explanations of E0250, E0368, E0372.
Nick Hamann [Tue, 19 May 2015 21:51:28 +0000 (16:51 -0500)]
Small improvements for explanations of E0250, E0368, E0372.

9 years agoAdd error explanations for E0055, E0089, E0192, E0261, E0262, E0263, E0318.
Nick Hamann [Tue, 19 May 2015 17:38:17 +0000 (12:38 -0500)]
Add error explanations for E0055, E0089, E0192, E0261, E0262, E0263, E0318.

9 years agoAuto merge of #24657 - aochagavia:rustdoc, r=alexcrichton
bors [Tue, 26 May 2015 20:04:09 +0000 (20:04 +0000)]
Auto merge of #24657 - aochagavia:rustdoc, r=alexcrichton

Fixes #24575
Fixes #25673

r? @alexcrichton

9 years agoetc: use codecs in featureck
Richo Healey [Tue, 26 May 2015 19:09:28 +0000 (12:09 -0700)]
etc: use codecs in featureck

this asserts that source is valid utf8 on both python3 and python2

9 years agoAuto merge of #25593 - nham:E0210_E0326, r=alexcrichton
bors [Tue, 26 May 2015 18:30:42 +0000 (18:30 +0000)]
Auto merge of #25593 - nham:E0210_E0326, r=alexcrichton

Changes:

 - adds explanations for E0185, E0186, E0202, E0326
 - fixes the explanation for E0053. The previous description was too narrow; there are other error cases.
 - changes the error message for E0202 to be specific for associated types, since it seems inherent associated constants are implemented.

Part of #24407

9 years agomk: Ensure LINK_$(1) is defined for all targets
Alex Crichton [Tue, 26 May 2015 16:48:24 +0000 (09:48 -0700)]
mk: Ensure LINK_$(1) is defined for all targets

The changes scaled back in 4cc025d8 were a little too aggressive and broke a
bunch of cross compilations by not defining the `LINK_$(1)` variable for all
targets. This commit ensures that the variable is defined for all targets by
defaulting it to the normal compiler if it's not already defined (it's only
defined specially for MSVC).

Closes #25723

9 years agoAdd tests for fixed issues
Ariel Ben-Yehuda [Tue, 26 May 2015 17:01:20 +0000 (20:01 +0300)]
Add tests for fixed issues

Fixes #23037.
Fixes #25339.

9 years agoAuto merge of #25091 - quantheory:trait_associated_const_fixes, r=nikomatsakis
bors [Tue, 26 May 2015 16:58:07 +0000 (16:58 +0000)]
Auto merge of #25091 - quantheory:trait_associated_const_fixes, r=nikomatsakis

Closes #25046 (by rejecting the code that causes the ICE) and #24946. I haven't been able to deal with the array size or recursion issues yet for associated consts, though my hope was that the change I made for range match patterns might help with array sizes, too.

This PR is pretty much orthogonal to #25065.

9 years agoDocument std::env::const values
Steve Klabnik [Thu, 21 May 2015 03:19:55 +0000 (23:19 -0400)]
Document std::env::const values

9 years agoDo not trip an assert when coercing &Trait to &Trait in constants.
Eduard Burtescu [Tue, 26 May 2015 14:57:40 +0000 (17:57 +0300)]
Do not trip an assert when coercing &Trait to &Trait in constants.
Fixes #24644.

9 years agoImplement defaults for associated types
Ariel Ben-Yehuda [Tue, 26 May 2015 14:12:39 +0000 (17:12 +0300)]
Implement defaults for associated types

9 years agoAuto merge of #25411 - alexcrichton:issue-18913, r=brson
bors [Tue, 26 May 2015 14:08:24 +0000 (14:08 +0000)]
Auto merge of #25411 - alexcrichton:issue-18913, r=brson

This flag indicates that when files are being replaced or added to archives (the
`r` flag) that the new file should not be inserted if it is not newer than the
file that already exists in the archive. The compiler never actually has a use
case of *not* wanting to insert a file because it already exists, and this
causes rlibs to not be updated in some cases when the compiler was re-run too
quickly.

Closes #18913

9 years agorustc_back: Don't pass 'u' to ar invocations
Alex Crichton [Thu, 14 May 2015 18:53:37 +0000 (11:53 -0700)]
rustc_back: Don't pass 'u' to ar invocations

This flag indicates that when files are being replaced or added to archives (the
`r` flag) that the new file should not be inserted if it is not newer than the
file that already exists in the archive. The compiler never actually has a use
case of *not* wanting to insert a file because it already exists, and this
causes rlibs to not be updated in some cases when the compiler was re-run too
quickly.

Closes #18913

9 years agoAuto merge of #25785 - arielb1:cleanup-201505, r=eddyb
bors [Tue, 26 May 2015 12:15:30 +0000 (12:15 +0000)]
Auto merge of #25785 - arielb1:cleanup-201505, r=eddyb

The caching essentially eliminates "stability checking" time (my attempt to clean-up junk got tangled up with stability, so I added the caching while I was at it).

r? @eddyb

9 years agoAuto merge of #25778 - econoplas:master, r=pnkfelix
bors [Tue, 26 May 2015 09:49:36 +0000 (09:49 +0000)]
Auto merge of #25778 - econoplas:master, r=pnkfelix

A regression was introduced by commit https://github.com/rust-lang/rust/commit/7b1916d25347913fce3e336517ef22025ccd875f #25612.  Negative signed integer literals less than -9223372036854775808i64 were no longer properly reported as #[warn(overflowing_literals)].

Also adding missing test cases to test/compile-fail/lint-type-overflow.rs which could have detected the regression.

Further explanation:

The expression `(negative && v > max as u64 + 1)` relies on the fact that algebraically speaking `-min == max + 1` to avoid negation and removing the need for `min` completely.

If i128 or i256 are ever added, it should also work for these types without requiring a change to `min != i64::MIN &&` also simplifying maintenance.

r? @pnkfelix

9 years agoRemove ObjectCastMap
Ariel Ben-Yehuda [Mon, 25 May 2015 23:28:04 +0000 (02:28 +0300)]
Remove ObjectCastMap