Commit Graph

53755 Commits

Author SHA1 Message Date
Alex Crichton
09859692ff rustbuild: Add support for --enable-local-rust
This commit adds support for the `--enable-local-rust` `./configure` switch
which uses the locally installed `rustc` to bootstrap the compiler.
2016-05-23 22:57:33 -07:00
diwic
86a6256270 panic.rs: fix docs (recover -> catch_unwind)
The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).
2016-05-24 07:28:32 +02:00
Alex Crichton
a2434eb950 mk: Fix bootstrapping cross-hosts on beta
The beta builds are currently failing, unfortunately, due to what is presumably
some odd behavior with our makefiles. The wrong bootstrap key is being used to
generate the stage1 cross-compiled libraries, which fails the build.
Interestingly enough if the targets are directly specified as part of the build
then it works just fine! Just a bare `make` fails...

Instead of trying to understand what's happening in the makefiles instead just
tweak how we configure the bootstrap key in a way that's more likely to work.
2016-05-23 22:21:21 -07:00
bors
dd6e8d45e1 Auto merge of #33787 - cuviper:local-rebuild, r=alexcrichton
Add --enable-local-rebuild to bootstrap from the current release

In Linux distributions, it is often necessary to rebuild packages for cases like applying new patches or linking against new system libraries.  In this scenario, the rustc in the distro build environment may already match the current release that we're trying to rebuild.  Thus we don't want to use the prior release's bootstrap key, nor `--cfg stage0` for the prior unstable features.

The new `configure --enable-local-rebuild` option specifies that we are rebuilding from the current release.  The current bootstrap key is used for the local rustc, and current stage1 features are also assumed.  Both the makefiles and rustbuild support this configuration.

Fixes #29556
r? @alexcrichton
2016-05-23 20:02:23 -07:00
Srinivas Reddy Thatiparthy
69db6e6032 format with [rustfmt_skip] and addressed a few comments 2016-05-24 07:39:55 +05:30
Guillaume Gomez
22d626f555 Fix invalid background color in stability elements 2016-05-24 00:33:16 +02:00
bors
57ef015132 Auto merge of #33664 - huonw:abs_sub, r=alexcrichton
Deprecate {f32,f64}::abs_sub.

The abs_sub name is misleading: the function actually computes the
positive difference (`fdim` in C), not the `(x - y).abs()` that *many* people expect
from the name.

This function can be replaced with just `(x - y).max(0.0)`, mirroring
the `abs` version, but this behaves differently with NAN: `NAN.max(0.0)
== 0.0`, while `NAN.positive_diff(0.0) == NAN`. People who absolutely
need that behaviour can use the C function directly and/or talk to the libs
team (we haven't encountered a concrete use-case for this functionality).

Closes #30315.
2016-05-23 13:31:59 -07:00
Jonathan Turner
428099233a Fix #33819 and update ui test 2016-05-23 14:48:11 -04:00
Carol (Nichols || Goulding)
1e809f57a4 "the trait Hash" => "the Hash trait" 2016-05-23 14:39:41 -04:00
Carol (Nichols || Goulding)
1a7d3e1344 Complete PartialOrd's example so it passes make check-docs 2016-05-23 14:39:41 -04:00
Nick Hamann
7d78436359 Improve the long explanation of E0207.
The previous explanation does not seem to explain what it means for an
implementation parameter to be used or unused. The new explanation lists
the three ways specific ways by which an impl parameter becomes constrained
(taken from RFC 447).

This also adds a link to RFC 447.

The explanation has two different examples. The first is adapted from RFC 447,
and shows an instance of E0207 on a impl for a type. The second one is a trait
impl example adapted from issue #22834.

Closes #33650
2016-05-23 13:18:28 -05:00
Carol (Nichols || Goulding)
1b32298396 Move all Default docs from module to trait
I had already copied the implementation example in a previous commit;
this copies the explanation and usage examples to the general trait
description.
2016-05-23 13:47:28 -04:00
Carol (Nichols || Goulding)
d81a999b54 Prefer ClassName over Self in example trait implementations 2016-05-23 13:14:15 -04:00
Carol (Nichols || Goulding)
daa9dcaac4 Use () when referring to functions 2016-05-23 13:06:23 -04:00
Carol (Nichols || Goulding)
9149992604 Add some newlines in some code examples 2016-05-23 13:04:05 -04:00
Carol (Nichols || Goulding)
497cbb6748 "non equal" => "not equal"; consistent with the surrounding text 2016-05-23 13:02:16 -04:00
Seo Sanghyeon
3c4eb01482 Remove unused field and argument 2016-05-24 02:00:39 +09:00
Carol (Nichols || Goulding)
c22c52449a "more than 32" => "more than 32 elements" 2016-05-23 13:00:01 -04:00
Carol (Nichols || Goulding)
d2ee6e04ab Emphasize semantic differences of Copy/Clone rather than impl 2016-05-23 12:58:42 -04:00
Carol (Nichols || Goulding)
b4e123d3e0 Shorten, yet clarify, initial summary sentences 2016-05-23 12:53:42 -04:00
Jonathan Turner
9e5574803f Update error format for readability. Add spacing header<->snippet and another line between errors 2016-05-23 12:51:00 -04:00
Josh Stone
0ca7d3dc1f bootstrap: rename Config.rebuild to .local_rebuild 2016-05-23 09:49:46 -07:00
Felix S. Klock II
71af40bb9d revised mir-dataflow so bitvectors carry a phantom type for their index domain.
As some drive-by's:

 * moved bitwise operators into `mod bitslice`

 * factored out `fn gen` and `fn kill` methods on `BlockSets` type

 * removed outdated comment about `fn propagate_call_return`
2016-05-23 18:26:52 +02:00
Seo Sanghyeon
f27fbf9a4a Do not inject test harness for --cfg test 2016-05-24 00:44:44 +09:00
Alex Crichton
c60235bba2 mk: Bump version number
The 1.10 betas are now under way so we're now working on the 1.11 release.
2016-05-23 08:25:11 -07:00
bors
1ccada6cd3 Auto merge of #33735 - jseyfried:concat_idents_in_ty_positions, r=nrc
Allow `concat_idents!` in type positions as well as in expression positions

This allows the `concat_idents!` macro in type positions as well as in expression positions.
r? @nrc
2016-05-23 07:53:43 -07:00
Michael Woerister
4386d19185 trans::collector: Remove some redundant calls to erase_regions(). 2016-05-23 10:21:50 -04:00
Carol (Nichols || Goulding)
bd50effe0f Make the Default docs more like the other traits
Add explicit "Derivable" and "How can I implement `Default`" sections.
Copied relevant sections from the module-level documentation, but also
linked to there-- it has a more comprehensive narrative with examples
that show implementation AND use. Decided to just put implementation
example in the trait documentation.
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
8b00a086e7 Add an explicit "How can I implement PartialOrd" doc section
Similar to the `Ord` examples but calling out that it can be defined
using `cmp` from `Ord` or using `partial_cmp` in a situation that
demands that.
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
9efa445656 Add an explicit "How can I implement Ord" doc section
References:
- http://stackoverflow.com/q/29884402/51683
- http://stackoverflow.com/q/28387711/51683
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
61bb9b2d07 Add more information about implementing Hash
A bit of duplication from the module documentation, but simplified
to be closer to being trivially copy-paste-able.
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
c41227fefc Add more detail to Clone's documentation
Used as resources:
- https://users.rust-lang.org/t/whats-the-difference-between-trait-copy-and-clone/2609/2?u=carols10cents
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
54d2ef0e8e Add an explicit "How can I implement Eq" doc section
Building on the example in PartialEq.
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
e831c72a29 Add an explicit "How can I implement PartialEq"? doc section
Including an example of a custom implementation. I put this expanded
section after the `Derivable` section to encourage use of that first.
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
fc467b31c2 Reorder Copy doc sections
The new order puts all the "when" questions together and puts the "how"
question with the "derivable" section. So you have to scroll past (and
hopefully read) the can/cannot/should caveats and guidelines to get to
the information about how to actually go about doing it once you've
determined that you can and should, with derivable information first so
that you can just use the derived implementation if that applies.

Previous order:

* General explanation
* When can my type be `Copy`?
* How can I implement `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable

New order:

* General explanation
* When can my type be `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable
* How can I implement `Copy`?
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
2f44053332 Make Derivable header be an h2 instead of an h1
This matches the other subsections.
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
bbfb6e762b derive explanation for PartialOrd should match that for Ord
I think these just got out of sync, but both use a lexicographic
ordering.

Relevant commits in the history of these explanations:
* 8b81f76 on 2015-06-30
* e22770b on 2016-02-09
2016-05-23 10:03:44 -04:00
Carol (Nichols || Goulding)
1e493fd979 Add explanations about what derived trait implementations do 2016-05-23 10:03:44 -04:00
Felix S. Klock II
0796ee77ba add indexed_set mod for typed wrappers around bitarrays representing sets.
It provides an `Idx` trait for usize wrappers used to represent the
elements of such sets.
2016-05-23 14:31:52 +02:00
Tamir Bahar
bb94e6a739 Fixed link in Rust Book (no-stdlib)
Fix a broken link in the rust book.
2016-05-23 14:42:47 +03:00
bors
4c6b6c200b Auto merge of #33098 - raphlinus:master, r=alexcrichton
Efficient trie lookup for boolean Unicode properties

Replace binary search of ranges with trie lookup using leaves of
64-bit bitmap chunks. Benchmarks suggest this is approximately 10x
faster than the bsearch approach.
2016-05-23 02:48:11 -07:00
Masood Malekghassemi
808e4315e8 Propagate obligations through projection 2016-05-22 23:35:38 -07:00
bors
6e45564095 Auto merge of #31457 - lambda:rtabort-use-libc-abort, r=alexcrichton
Use libc::abort, not intrinsics::abort, in rtabort!

intrinsics::abort compiles down to an illegal instruction, which on
Unix-like platforms causes the process to be killed with SIGILL.  A more
appropriate way to kill the process would be SIGABRT; this indicates
better that the runtime has explicitly aborted, rather than some kind of
compiler bug or architecture mismatch that SIGILL might indicate.

For rtassert!, replace this with libc::abort.  libc::abort raises
SIGABRT, but is defined to do so in such a way that it will terminate
the process even if SIGABRT is currently masked or caught by a signal
handler that returns.

On non-Unix platforms, retain the existing behavior.  On Windows we
prefer to avoid depending on the C runtime, and we need a fallback for
any other platforms that may be defined.  An alternative on Windows
would be to call TerminateProcess, but this seems less essential than
switching to using SIGABRT on Unix-like platforms, where it is common
for the process-killing signal to be printed out or logged.

This is a [breaking-change] for any code that depends on the exact
signal raised to abort a process via rtabort!

cc #31273
cc #31333
2016-05-22 23:14:11 -07:00
Brian Campbell
cfc3865832 Use libc::abort, not intrinsics::abort, in rtabort!
intrinsics::abort compiles down to an illegal instruction, which on
Unix-like platforms causes the process to be killed with SIGILL.  A more
appropriate way to kill the process would be SIGABRT; this indicates
better that the runtime has explicitly aborted, rather than some kind of
compiler bug or architecture mismatch that SIGILL might indicate.

For rtassert!, replace this with libc::abort.  libc::abort raises
SIGABRT, but is defined to do so in such a way that it will terminate
the process even if SIGABRT is currently masked or caught by a signal
handler that returns.

On non-Unix platforms, retain the existing behavior.  On Windows we
prefer to avoid depending on the C runtime, and we need a fallback for
any other platforms that may be defined.  An alternative on Windows
would be to call TerminateProcess, but this seems less essential than
switching to using SIGABRT on Unix-like platforms, where it is common
for the process-killing signal to be printed out or logged.

This is a [breaking-change] for any code that depends on the exact
signal raised to abort a process via rtabort!

cc #31273
cc #31333
2016-05-23 00:22:41 -04:00
Alex Ozdemir
57ab0edaf0 Fixed shortcut handling. Reverted to [Shift]+[+=]
Realized browsers use [Ctrl]+[+=] for zoom, so using [Shift]+[+=] for
collapse/expand was not necessarily a conflict.

Also a bugfix.
2016-05-22 18:17:49 -07:00
ggomez
145747ebfc Don't suggest using fields in a static method 2016-05-23 01:18:06 +02:00
Nick Cameron
5106ce7bfb save-analysis: use a function's short name 2016-05-23 10:23:36 +12:00
Daniel Firth
6e9774f4bb Fix misleading intentation errors on gcc 6.0 2016-05-22 20:47:59 +01:00
Alex Ozdemir
01dc9f0be4 Changed toggle all sections key to T
Allows both `T` and `t`.

It had been [Shift]+[+] before.
2016-05-22 12:47:53 -07:00
Srinivas Reddy Thatiparthy
3d9d96b6da run rustfmt on libcollections test module 2016-05-22 23:57:13 +05:30