]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoRollup merge of #24698 - steveklabnik:remove_debug_display, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:14:16 +0000 (09:44 +0530)]
Rollup merge of #24698 - steveklabnik:remove_debug_display, r=steveklabnik

this is too small for its own thing, I think.

9 years agoRollup merge of #24523 - GuillaumeGomez:clean-error-codes, r=Manishearth
Manish Goregaokar [Fri, 24 Apr 2015 04:14:16 +0000 (09:44 +0530)]
Rollup merge of #24523 - GuillaumeGomez:clean-error-codes, r=Manishearth

9 years agoAuto merge of #24759 - Manishearth:rollup2, r=Manishearth
bors [Fri, 24 Apr 2015 05:09:31 +0000 (05:09 +0000)]
Auto merge of #24759 - Manishearth:rollup2, r=Manishearth

r? @Manishearth

9 years agofixup #24754
Manish Goregaokar [Fri, 24 Apr 2015 05:08:07 +0000 (10:38 +0530)]
fixup #24754

9 years agoRollup merge of #24754 - iliekturtles:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:20:16 +0000 (09:50 +0530)]
Rollup merge of #24754 - iliekturtles:patch-1, r=steveklabnik

9 years agoRollup merge of #24753 - tynopex:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:19:59 +0000 (09:49 +0530)]
Rollup merge of #24753 - tynopex:patch-1, r=steveklabnik

 Add section for range expressions.

9 years agoRollup merge of #24752 - doomrobo:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:19:44 +0000 (09:49 +0530)]
Rollup merge of #24752 - doomrobo:patch-1, r=steveklabnik

 Updated sample code to updated syntax (now compiles). Also tweaked the text to reflect the change.

9 years agoRollup merge of #24750 - withoutboats:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:19:27 +0000 (09:49 +0530)]
Rollup merge of #24750 - withoutboats:patch-1, r=steveklabnik

 1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.

9 years agoRollup merge of #24743 - geofft:trpl-macros-links, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:19:12 +0000 (09:49 +0530)]
Rollup merge of #24743 - geofft:trpl-macros-links, r=steveklabnik

 r? @steveklabnik

9 years agoRollup merge of #24742 - mbrubeck:keywords, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:18:50 +0000 (09:48 +0530)]
Rollup merge of #24742 - mbrubeck:keywords, r=steveklabnik

 * Add two missing keywords, `Self` and `proc`
* Fix some mis-alphabetized keywords

r? @steveklabnik

9 years agoRollup merge of #24740 - mbrubeck:reference, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:18:33 +0000 (09:48 +0530)]
Rollup merge of #24740 - mbrubeck:reference, r=steveklabnik

 r? @steveklabnik

9 years agoRollup merge of #24739 - nrc:span-item, r=huonw
Manish Goregaokar [Fri, 24 Apr 2015 04:18:18 +0000 (09:48 +0530)]
Rollup merge of #24739 - nrc:span-item, r=huonw

 (And other kinds of items).

This brings trait/impl items in line with top-level items in this respect. It means we don't get the attributes when showing error messages for methods, etc. (a good thing, I think). Since attributes have spans it is still easy to create a span for the item + all attributes.

9 years agoRollup merge of #24734 - vadimcn:patch-1, r=alexcrichton
Manish Goregaokar [Fri, 24 Apr 2015 04:17:58 +0000 (09:47 +0530)]
Rollup merge of #24734 - vadimcn:patch-1, r=alexcrichton

 'win32' -> 'windows', added 'ios'

9 years agoRollup merge of #24733 - nwin:patch-1, r=steveklabnik
Manish Goregaokar [Fri, 24 Apr 2015 04:17:43 +0000 (09:47 +0530)]
Rollup merge of #24733 - nwin:patch-1, r=steveklabnik

 Consistency. The book also refers to it as trait objects.

9 years agoFix spelling errors.
Mike Boutin [Fri, 24 Apr 2015 00:26:24 +0000 (20:26 -0400)]
Fix spelling errors.

9 years agoUpdate reference.md
tynopex [Fri, 24 Apr 2015 00:38:11 +0000 (20:38 -0400)]
Update reference.md

Add section for range expressions.

9 years agoUpdate "Generic Functions" section
Michael Rosenberg [Fri, 24 Apr 2015 00:33:46 +0000 (20:33 -0400)]
Update "Generic Functions" section

Updated sample code to updated syntax (now compiles). Also tweaked the text to reflect the change.

9 years agoFixed typo
Lee Aronson [Thu, 23 Apr 2015 23:50:05 +0000 (16:50 -0700)]
Fixed typo

9 years agoImprove information about loops
Lee Aronson [Thu, 23 Apr 2015 23:46:33 +0000 (16:46 -0700)]
Improve information about loops

1) Moved 'while' section below 'loop', 'break', and 'continue'; 2) Added information to 'while' and 'for' loops that they interact with 'break' and 'continue' and may have a lifetime label. 3) Clarified labeling syntax on the infinite loops.

9 years agoAuto merge of #24633 - rapha:master, r=alexcrichton
bors [Thu, 23 Apr 2015 23:44:40 +0000 (23:44 +0000)]
Auto merge of #24633 - rapha:master, r=alexcrichton

9 years agoAuto merge of #24695 - bluss:arc-default, r=alexcrichton
bors [Thu, 23 Apr 2015 21:42:32 +0000 (21:42 +0000)]
Auto merge of #24695 - bluss:arc-default, r=alexcrichton

Relax bounds on Default implementation for Arc.

Send + Sync are overly restrictive, follow other traits for Arc.

9 years agoAlso mention `/*!` doc comments.
Matt Brubeck [Thu, 23 Apr 2015 21:25:30 +0000 (14:25 -0700)]
Also mention `/*!` doc comments.

9 years agoTRPL: Remove references to "advanced macros chapter"
Geoffrey Thomas [Thu, 23 Apr 2015 21:17:14 +0000 (17:17 -0400)]
TRPL: Remove references to "advanced macros chapter"

This was merged back into the regular macros chapter, but a few
references lingered and caused broken links.

9 years agoUpdate and organize the Keywords table
Matt Brubeck [Thu, 23 Apr 2015 21:14:15 +0000 (14:14 -0700)]
Update and organize the Keywords table

* Add two missing keywords, `Self` and `proc`
* Fix some mis-alphabetized keywords

9 years agoTRPL: Fix link to macro section of reference
Geoffrey Thomas [Thu, 23 Apr 2015 21:08:19 +0000 (17:08 -0400)]
TRPL: Fix link to macro section of reference

9 years agoClarify that //! comments are also doc comments.
Matt Brubeck [Thu, 23 Apr 2015 21:03:25 +0000 (14:03 -0700)]
Clarify that //! comments are also doc comments.

9 years agoDo not include attributes in trait item spans.
Nick Cameron [Thu, 23 Apr 2015 20:45:32 +0000 (08:45 +1200)]
Do not include attributes in trait item spans.

(And other kinds of items).

9 years agoAuto merge of #24615 - arielb1:rapid-reject, r=nikomatsakis
bors [Thu, 23 Apr 2015 19:39:40 +0000 (19:39 +0000)]
Auto merge of #24615 - arielb1:rapid-reject, r=nikomatsakis

skolemize_late_bound_regions essentially copies the entire type (most of the times it shouldn't, but it does), and match_impl runs millions of times.

Times compiling rustc, tested with
$ make -j4 rustc-stage1
$ ( time RUSTFLAGS=-Z time-passes make -j4 rustc-stage2 ) # need LLVM time for calibration

Before:
real 21m44.960s
user 29m38.812s
sys 0m14.944s

After:
real 19m31.445s
user 26m47.260s
sys 0m14.952s

Making this is a 10% performance improvement.

LLVM passes took 867 seconds before, 862 seconds after.

9 years agoUpdate supported values of target_os
Vadim Chugunov [Thu, 23 Apr 2015 19:32:25 +0000 (12:32 -0700)]
Update supported values of target_os

'win32' -> 'windows', added 'ios'

9 years agotypo 2
nwin [Thu, 23 Apr 2015 19:26:34 +0000 (21:26 +0200)]
typo 2

9 years agotypo
nwin [Thu, 23 Apr 2015 19:25:09 +0000 (21:25 +0200)]
typo

9 years agoobject type -> trait object
nwin [Thu, 23 Apr 2015 19:23:35 +0000 (21:23 +0200)]
object type -> trait object

Consistency. The book also refers to it as trait objects.

9 years agoAuto merge of #24537 - rprichard:fix-parallel-check, r=alexcrichton
bors [Thu, 23 Apr 2015 17:32:16 +0000 (17:32 +0000)]
Auto merge of #24537 - rprichard:fix-parallel-check, r=alexcrichton

This required fixing the `pretty-rpass-full` tests to have the same `$$(CSREQ$(1)_T_$(2)_H_$(3))`  dependencies as the `rpass-full` and `cfail-full` tests.  It also required fixing the `run-make/simd-ffi` test to use unique names for its output files.

9 years agoUpdate diagnostics.rs
Guillaume Gomez [Tue, 21 Apr 2015 09:51:49 +0000 (11:51 +0200)]
Update diagnostics.rs

9 years agoImplement IntoIterator for Receiver
Raphael Speyer [Mon, 20 Apr 2015 16:01:06 +0000 (02:01 +1000)]
Implement IntoIterator for Receiver

9 years agoAuto merge of #24694 - liigo:toggle-all-docs-using-one-link, r=alexcrichton
bors [Thu, 23 Apr 2015 14:09:10 +0000 (14:09 +0000)]
Auto merge of #24694 - liigo:toggle-all-docs-using-one-link, r=alexcrichton

Combine the two links, [-] and [+], at top-right corner of the page, to use a single and the same one, so that:

- one less link to be created/displayed
- be consistent with other [-]/[+] links in the same page
- people can easily toggle docs without moving their mouse pointer

I also added tooltips/titles to these links.

9 years agoAuto merge of #24664 - steveklabnik:doc_ufcs, r=alexcrichton
bors [Thu, 23 Apr 2015 12:04:01 +0000 (12:04 +0000)]
Auto merge of #24664 - steveklabnik:doc_ufcs, r=alexcrichton

AKA, two four-letter acronyms :wink:

This feels a bit light, if there's other things I should add, let me know.

9 years agoAuto merge of #24714 - frewsxcv:patch-15, r=alexcrichton
bors [Thu, 23 Apr 2015 09:58:12 +0000 (09:58 +0000)]
Auto merge of #24714 - frewsxcv:patch-15, r=alexcrichton

9 years agoAuto merge of #24704 - brson:installer, r=alexcrichton
bors [Thu, 23 Apr 2015 07:56:17 +0000 (07:56 +0000)]
Auto merge of #24704 - brson:installer, r=alexcrichton

r? @alexcrichton

9 years agoIndicate trait names in doc-comment are code-like
Corey Farwell [Thu, 23 Apr 2015 05:27:11 +0000 (01:27 -0400)]
Indicate trait names in doc-comment are code-like

9 years agoAuto merge of #24693 - brson:beta, r=alexcrichton
bors [Thu, 23 Apr 2015 04:50:39 +0000 (04:50 +0000)]
Auto merge of #24693 - brson:beta, r=alexcrichton

Instead of rustc-1.0.0-beta-$triple.tar.gz, betas will be named
rustc-beta-$triple.tar.gz. This will give betas a stable download
URL, prevent old artifacts from accumulating in the dist server's
root directory, and not require the website to be updated every
beta.

As a tradeoff, it will be harder to download previous betas because
they will need to be located in the archives.

I'm still unsure about whether this is the right choice.

cc @alexcrichton @steveklabnik

9 years agoInclude the mode in compiletest's aux-build directory.
Ryan Prichard [Thu, 23 Apr 2015 02:01:42 +0000 (19:01 -0700)]
Include the mode in compiletest's aux-build directory.

The run-pass and pretty run-pass tests could run concurrently, and if they
do, they need to keep their output segregated.

This change might be overkill. We need the suffix for the `pretty` mode,
but we might not need it otherwise. The `debuginfo-lldb` and
`debuginfo-gdb` modes look like they could also need it, but the current
`tests.mk` file happens not to enable both lldb and gdb at the same time,
for incidental reasons.

9 years agoReplace ignore-android with ignore-cross-compile in rustdoc tests
Ryan Prichard [Wed, 22 Apr 2015 22:22:36 +0000 (15:22 -0700)]
Replace ignore-android with ignore-cross-compile in rustdoc tests

The problem is that rustdoc searches for external crates using the host
triple, not the target triple. It's actually unclear to me whether this is
correct behavior or not, but it is necessary to get cross-compiled tests
working.

9 years agoIgnore cross-compilation in some fulldeps tests.
Ryan Prichard [Wed, 22 Apr 2015 22:20:57 +0000 (15:20 -0700)]
Ignore cross-compilation in some fulldeps tests.

These tests fail, in general, for cross-compilation, because they require
the rustc crates to exist for the target, and they don't. We can't compile
them for the target unless we also compile LLVM for the target (we don't).

Android is a subset of cross-compilation.

The other fulldeps tests, on the other hand, work fine for
cross-compilation, and in fact, are verifying that rustc correctly searches
for a host plugin crate, not a target plugin crate.

9 years agoFix run-make/simd-ffi to work with parallel make check.
Ryan Prichard [Fri, 17 Apr 2015 11:58:47 +0000 (04:58 -0700)]
Fix run-make/simd-ffi to work with parallel make check.

9 years agoFix the dependency for the pretty-rpass-full tests
Ryan Prichard [Fri, 17 Apr 2015 12:05:22 +0000 (05:05 -0700)]
Fix the dependency for the pretty-rpass-full tests

The current code attempts to define the
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work,
because $(1) and $(3) are not inside a function. Moreover, there is a test
(run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not
an indirect dependency of librustc or libsyntax. Listing all the
dependencies will be hard to maintain, but there's a better way to do
this...

As with the rpass-full and cfail-full tests, add dependencies using the
$$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of
host and target crates, built for a particular stage and host. We use
T_$(3), not T_$(2), because we only build LLVM for host triples (not
target triples), so we can only build rustc_llvm for host triples. The
fulldeps tests that use plugins need host rustc crates, whereas fulldeps
tests that link against rustc and run should be skipped for
cross-compilation (such as Android).

Fixes #22021

9 years agoAuto merge of #24683 - P1start:help-suggestions, r=nrc
bors [Thu, 23 Apr 2015 02:45:06 +0000 (02:45 +0000)]
Auto merge of #24683 - P1start:help-suggestions, r=nrc

This PR uses the inline error suggestions introduced in #24242 to modify a few existing `help` messages. The new errors look like this:

    foobar.rs:5:12: 5:25 error: expected a path on the left-hand side of `+`,
                                not `&'static Copy` [E0178]
    foobar.rs:5     let x: &'static Copy + 'static;
                           ^~~~~~~~~~~~~
    foobar.rs:5:12: 5:35 help: try adding parentheses (per RFC 438):
    foobar.rs:      let x: &'static (Copy + 'static);

    foobar.rs:2:13: 2:23 error: cast to unsized type: `&_` as `core::marker::Copy`
    foobar.rs:2     let x = &1 as Copy;
                            ^~~~~~~~~~
    foobar.rs:2:19: 2:23 help: try casting to a reference instead:
    foobar.rs:      let x = &1 as &Copy;

    foobar.rs:7:24: 7:25 error: expected expression, found `;`
    foobar.rs:7     let x = box (1 + 1);
                                       ^
    foobar.rs:7:13: 7:16 help: try using `box()` instead:
    foobar.rs:      let x = box() (1 + 1);

This also modifies compiletest to give the ability to directly test suggestions given by error messages.

9 years agoAuto merge of #24703 - Manishearth:rollup, r=Manishearth
bors [Wed, 22 Apr 2015 23:25:32 +0000 (23:25 +0000)]
Auto merge of #24703 - Manishearth:rollup, r=Manishearth

r? @Manishearth

9 years agofix doctest
Manish Goregaokar [Wed, 22 Apr 2015 23:26:00 +0000 (04:56 +0530)]
fix doctest

9 years agoTRPL: UFCS
Steve Klabnik [Tue, 21 Apr 2015 16:07:00 +0000 (12:07 -0400)]
TRPL: UFCS

AKA, two four-letter acronyms :wink:

9 years agoconfigure: Fix CDPATH bug
Brian Anderson [Wed, 22 Apr 2015 21:52:35 +0000 (14:52 -0700)]
configure: Fix CDPATH bug

9 years agoRollup merge of #24688 - SimonSapin:fmt-write-char, r=alexcrichton
Manish Goregaokar [Wed, 22 Apr 2015 21:51:02 +0000 (03:21 +0530)]
Rollup merge of #24688 - SimonSapin:fmt-write-char, r=alexcrichton

… added in #24661.

9 years agoRollup merge of #24675 - steveklabnik:two_more_chapters, r=alexcrichton
Manish Goregaokar [Wed, 22 Apr 2015 21:51:02 +0000 (03:21 +0530)]
Rollup merge of #24675 - steveklabnik:two_more_chapters, r=alexcrichton

Two more chapters of TRPL. The `type` one is pretty straightforward, but I wasn't really sure what to put for unsized types. I just explained the very basics, and the special bounds syntax. Thoughts on what else should go here?

r? @alexcrichton

9 years agoRollup merge of #24673 - steveklabnik:doc_attributes, r=alexcrichton
Manish Goregaokar [Wed, 22 Apr 2015 21:51:02 +0000 (03:21 +0530)]
Rollup merge of #24673 - steveklabnik:doc_attributes, r=alexcrichton

r? @alexcrichton

9 years agoUpdate rust-installer. Fixes problems with CDPATH
Brian Anderson [Wed, 22 Apr 2015 21:49:01 +0000 (14:49 -0700)]
Update rust-installer. Fixes problems with CDPATH

9 years agoremove debug and display chapter
Steve Klabnik [Wed, 22 Apr 2015 20:41:22 +0000 (16:41 -0400)]
remove debug and display chapter

this is too small for its own thing, I think.

9 years agoAuto merge of #24447 - alexcrichton:audit-thread, r=aturon
bors [Wed, 22 Apr 2015 18:48:31 +0000 (18:48 +0000)]
Auto merge of #24447 - alexcrichton:audit-thread, r=aturon

Much of this code hasn't been updated in quite some time and this commit does a
small audit of the functionality:

* Implementation functions now centralize all functionality on a locally defined
  `Thread` type.
* The `detach` method has been removed in favor of a `Drop` implementation. This
  notably fixes leaking thread handles on Windows.
* The `Thread` structure is now appropriately annotated with `Send` and `Sync`
  automatically on Windows and in a custom fashion on Unix.
* The unsafety of creating a thread has been pushed out to the right boundaries
  now.

Closes #24442

9 years agostd: Audit std::thread implementations
Alex Crichton [Wed, 15 Apr 2015 05:13:57 +0000 (22:13 -0700)]
std: Audit std::thread implementations

Much of this code hasn't been updated in quite some time and this commit does a
small audit of the functionality:

* Implementation functions now centralize all functionality on a locally defined
  `Thread` type.
* The `detach` method has been removed in favor of a `Drop` implementation. This
  notably fixes leaking thread handles on Windows.
* The `Thread` structure is now appropriately annotated with `Send` and `Sync`
  automatically on Windows and in a custom fashion on Unix.
* The unsafety of creating a thread has been pushed out to the right boundaries
  now.

Closes #24442

9 years agorustdoc: toggle collapse/expand all docs using the same link
Liigo Zhuang [Wed, 22 Apr 2015 16:50:19 +0000 (00:50 +0800)]
rustdoc: toggle collapse/expand all docs using the same link

9 years agoTRPL: type aliases and unsized types
Steve Klabnik [Tue, 21 Apr 2015 23:44:54 +0000 (19:44 -0400)]
TRPL: type aliases and unsized types

9 years agoRelax bounds on Default implementation for Arc.
Ulrik Sverdrup [Wed, 22 Apr 2015 17:05:51 +0000 (19:05 +0200)]
Relax bounds on Default implementation for Arc.

Send + Sync are overly restrictive, follow other traits for Arc.

9 years agomk: Remove version numbers from beta artifacts
Brian Anderson [Wed, 22 Apr 2015 15:51:39 +0000 (08:51 -0700)]
mk: Remove version numbers from beta artifacts

Instead of rustc-1.0.0-beta-$triple.tar.gz, betas will be named
rustc-beta-$triple.tar.gz. This will give betas a stable download
URL, prevent old artifacts from accumulating in the dist server's
root directory, and not require the website to be updated every
beta.

As a tradeoff, it will be harder to download previous betas because
they will need to be located in the archives.

9 years agoTRPL: attributes & conditional compilation
Steve Klabnik [Tue, 21 Apr 2015 22:52:01 +0000 (18:52 -0400)]
TRPL: attributes & conditional compilation

9 years agoAuto merge of #24692 - frewsxcv:rm-default-imports, r=alexcrichton
bors [Wed, 22 Apr 2015 14:41:25 +0000 (14:41 +0000)]
Auto merge of #24692 - frewsxcv:rm-default-imports, r=alexcrichton

In 8f5b5f94dcdb9884737dfbc8efd893d1d70f0b14, `default::Default` was
added to the prelude, so these imports are no longer necessary.

9 years agoRemove doc-comment default::Default imports
Corey Farwell [Wed, 22 Apr 2015 13:42:36 +0000 (09:42 -0400)]
Remove doc-comment default::Default imports

In 8f5b5f94dcdb9884737dfbc8efd893d1d70f0b14, `default::Default` was
added to the prelude, so these imports are no longer necessary.

9 years agoAuto merge of #24685 - nrc:span-pred, r=huonw
bors [Wed, 22 Apr 2015 08:47:09 +0000 (08:47 +0000)]
Auto merge of #24685 - nrc:span-pred, r=huonw

9 years agoAdd a test for std::fmt::Write::write_char
Simon Sapin [Wed, 22 Apr 2015 06:52:18 +0000 (08:52 +0200)]
Add a test for std::fmt::Write::write_char

9 years agoAuto merge of #24671 - steveklabnik:doc_const_static, r=alexcrichton
bors [Wed, 22 Apr 2015 06:37:57 +0000 (06:37 +0000)]
Auto merge of #24671 - steveklabnik:doc_const_static, r=alexcrichton

r? @alexcrichton

9 years agoFix spans for predicates in where clauses
Nick Cameron [Wed, 22 Apr 2015 06:29:54 +0000 (18:29 +1200)]
Fix spans for predicates in where clauses

9 years agoAuto merge of #24674 - alexcrichton:rollup, r=alexcrichton
bors [Wed, 22 Apr 2015 03:38:20 +0000 (03:38 +0000)]
Auto merge of #24674 - alexcrichton:rollup, r=alexcrichton

9 years agoTRPL: const and static
Steve Klabnik [Tue, 21 Apr 2015 18:59:42 +0000 (14:59 -0400)]
TRPL: const and static

9 years agoMerge remote-tracking branch 'origin/master' into rollup
Alex Crichton [Tue, 21 Apr 2015 23:27:26 +0000 (16:27 -0700)]
Merge remote-tracking branch 'origin/master' into rollup

9 years agoTest fixes and rebase conflicts, round 1
Alex Crichton [Tue, 21 Apr 2015 22:59:14 +0000 (15:59 -0700)]
Test fixes and rebase conflicts, round 1

9 years agorollup merge of #24636: alexcrichton/remove-deprecated
Alex Crichton [Tue, 21 Apr 2015 22:28:53 +0000 (15:28 -0700)]
rollup merge of #24636: alexcrichton/remove-deprecated

Conflicts:
src/libcore/result.rs

9 years agorollup merge of #24541: alexcrichton/issue-24538
Alex Crichton [Tue, 21 Apr 2015 22:28:06 +0000 (15:28 -0700)]
rollup merge of #24541: alexcrichton/issue-24538

This is an implementation of [RFC 1030][rfc] which adds these traits to the
prelude and additionally removes all inherent `into_iter` methods on collections
in favor of the trait implementation (which is now accessible by default).

[rfc]: https://github.com/rust-lang/rfcs/pull/1030

This is technically a breaking change due to the prelude additions and removal
of inherent methods, but it is expected that essentially no code breaks in
practice.

[breaking-change]
Closes #24538

9 years agostd: Bring back f32::from_str_radix as an unstable API
Alex Crichton [Sat, 18 Apr 2015 06:45:55 +0000 (23:45 -0700)]
std: Bring back f32::from_str_radix as an unstable API

This API was exercised in a few tests and mirrors the `from_str_radix`
functionality of the integer types.

9 years agorollup merge of #24672: steveklabnik/edit_tuple_structs
Alex Crichton [Tue, 21 Apr 2015 22:23:18 +0000 (15:23 -0700)]
rollup merge of #24672: steveklabnik/edit_tuple_structs

I thought I edited all the last little chapters, but I missed this one.

r? @alexcrichton

9 years agorollup merge of #24670: brson/1.1
Alex Crichton [Tue, 21 Apr 2015 22:23:17 +0000 (15:23 -0700)]
rollup merge of #24670: brson/1.1

We're not going to do another merge into beta, so what's on master is now destined for 1.1.

Also reset the prerelease number to ".1"

9 years agorollup merge of #24669: steveklabnik/fix
Alex Crichton [Tue, 21 Apr 2015 22:23:17 +0000 (15:23 -0700)]
rollup merge of #24669: steveklabnik/fix

This section was added but the list wasn't updated.

9 years agorollup merge of #24667: steveklabnik/more_editing
Alex Crichton [Tue, 21 Apr 2015 22:23:16 +0000 (15:23 -0700)]
rollup merge of #24667: steveklabnik/more_editing

r? @alexcrichton

9 years agorollup merge of #24665: sw17ch/document-complete-slice-syntax
Alex Crichton [Tue, 21 Apr 2015 22:23:15 +0000 (15:23 -0700)]
rollup merge of #24665: sw17ch/document-complete-slice-syntax

The documentation doesn't appear to describe the `&foo[..]` syntax.

I tried looking in `primitive-types.html#slices` and `std/primitive.slice.html`.

There's an example of partially slicing an array in trpl and a mention of `&foo[..]` in [the standard library documentation](https://doc.rust-lang.org/std/primitive.slice.html), but neither place, from what I can see, actually describes the behavior of `&foo[..]`.

+r? @steveklabnik

9 years agorollup merge of #24663: steveklabnik/gh24639
Alex Crichton [Tue, 21 Apr 2015 22:23:14 +0000 (15:23 -0700)]
rollup merge of #24663: steveklabnik/gh24639

Fixes #24639

9 years agorollup merge of #24661: SimonSapin/fmt-write-char
Alex Crichton [Tue, 21 Apr 2015 22:23:13 +0000 (15:23 -0700)]
rollup merge of #24661: SimonSapin/fmt-write-char

as accepted in [RFC 526](https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md).

Note that this brand new method is marked as **stable**. I judged this safe enough: it’s simple enough that it’s very unlikely to change. Still, I can mark it unstable instead if you prefer.

r? @alexcrichton

9 years agorollup merge of #24654: mdinger/patch-2
Alex Crichton [Tue, 21 Apr 2015 22:23:12 +0000 (15:23 -0700)]
rollup merge of #24654: mdinger/patch-2

This just fixes some comments made on https://github.com/rust-lang/rust/pull/24632 . The second I think is better unless @steveklabnik actually meant something else.

9 years agorollup merge of #24651: tamird/old-references
Alex Crichton [Tue, 21 Apr 2015 22:23:11 +0000 (15:23 -0700)]
rollup merge of #24651: tamird/old-references

r? @alexcrichton

9 years agorollup merge of #24640: steveklabnik/new_unsafe_guide
Alex Crichton [Tue, 21 Apr 2015 22:23:10 +0000 (15:23 -0700)]
rollup merge of #24640: steveklabnik/new_unsafe_guide

https://github.com/rust-lang/rust/pull/24631 is related, as it will delete this from the TOC, but I want to keep it here.

9 years agorollup merge of #24635: tamird/llvm-3.5
Alex Crichton [Tue, 21 Apr 2015 22:23:10 +0000 (15:23 -0700)]
rollup merge of #24635: tamird/llvm-3.5

r? @alexcrichton

9 years agorollup merge of #24611: doomsplayer/doomsplayer-patch-1
Alex Crichton [Tue, 21 Apr 2015 22:23:09 +0000 (15:23 -0700)]
rollup merge of #24611: doomsplayer/doomsplayer-patch-1

as dependency for #24594

9 years agorollup merge of #24563: kwantam/rfc_1054
Alex Crichton [Tue, 21 Apr 2015 22:23:08 +0000 (15:23 -0700)]
rollup merge of #24563: kwantam/rfc_1054

For now, words() is left in (but deprecated), and Words is a type alias for
struct SplitWhitespace.

Also cleaned up references to str.words() throughout codebase.

Closes #15628

9 years agorollup merge of #24487: erickt/syntax
Alex Crichton [Tue, 21 Apr 2015 22:23:07 +0000 (15:23 -0700)]
rollup merge of #24487: erickt/syntax

This removes the usage of `#[feature(into_cow, slice_patterns, box_syntax, box_patterns, quote, unsafe_destructor)]` from being used in libsyntax. My main desire for this is that it brings me one step closer to letting [syntex](https://github.com/erickt/rust-syntex) compile with stable rust. Hopefully this doesn't inconvenience rust development.

9 years agorollup merge of #24439: alexcrichton/fix-archive-assembler
Alex Crichton [Tue, 21 Apr 2015 22:23:06 +0000 (15:23 -0700)]
rollup merge of #24439: alexcrichton/fix-archive-assembler

When linking an archive statically to an rlib, the compiler will extract all
contents of the archive and add them all to the rlib being generated. The
current method of extraction is to run `ar x`, dumping all files into a
temporary directory. Object archives, however, are allowed to have multiple
entries with the same file name, so there is no method for them to extract their
contents into a directory in a lossless fashion.

This commit adds iterator support to the `ArchiveRO` structure which hooks into
LLVM's support for reading object archives. This iterator is then used to
inspect each object in turn and extract it to a unique location for later
assembly.

9 years agorollup merge of #24222: lambda/rename-soft-link-to-symlink
Alex Crichton [Tue, 21 Apr 2015 22:23:06 +0000 (15:23 -0700)]
rollup merge of #24222: lambda/rename-soft-link-to-symlink

Implement [RFC #1048][rfc].

On Windows, when you create a symbolic link you must specify whether it
points to a directory or a file, even if it is created dangling, while
on Unix, the same symbolic link could point to a directory, a file, or
nothing at all.  Furthermore, on Windows special privilege is necessary
to use a symbolic link, while on Unix, you can generally create a
symbolic link in any directory you have write privileges to.

This means that it is unlikely to be able to use symbolic links purely
portably; anyone who uses them will need to think about the cross
platform implications.  This means that using platform-specific APIs
will make it easier to see where code will need to differ between the
platforms, rather than trying to provide some kind of compatibility
wrapper.

Furthermore, `soft_link` has no precedence in any other API, so to avoid
confusion, move back to the more standard `symlink` terminology.

Create a `std::os::unix::symlink` for the Unix version that is
destination type agnostic, as well as `std::os::windows::{symlink_file,
symlink_dir}` for Windows.

Because this is a stable API, leave a compatibility wrapper in
`std::fs::soft_link`, which calls `symlink` on Unix and `symlink_file`
on Windows, preserving the existing behavior of `soft_link`.

[rfc]: https://github.com/rust-lang/rfcs/pull/1048

9 years agorollup merge of #24162: pnkfelix/fsk-detect-duplicate-loop-labels
Alex Crichton [Tue, 21 Apr 2015 22:23:05 +0000 (15:23 -0700)]
rollup merge of #24162: pnkfelix/fsk-detect-duplicate-loop-labels

Check for duplicate loop labels in function bodies.

See also: http://internals.rust-lang.org/t/psa-rejecting-duplicate-loop-labels/1833

The change, which we are putting in as future-proofing in preparation for future potential additions to the language (namely labeling arbitrary blocks and using those labels in borrow expressions), means that code like this will start emitting warnings:

```rust
fn main() {
    { 'a: loop { break; } }
    { 'a: loop { break; } }
}
```

To make the above code compile without warnings, write this instead:

```rust
fn main() {
    { 'a: loop { break; } }
    { 'b: loop { break; } }
}
```

Since this change is only introducing a new warnings, this change is non-breaking.

Fix #21633

9 years agoAuto merge of #24162 - pnkfelix:fsk-detect-duplicate-loop-labels, r=nikomatsakis
bors [Tue, 21 Apr 2015 21:18:30 +0000 (21:18 +0000)]
Auto merge of #24162 - pnkfelix:fsk-detect-duplicate-loop-labels, r=nikomatsakis

Check for duplicate loop labels in function bodies.

See also: http://internals.rust-lang.org/t/psa-rejecting-duplicate-loop-labels/1833

The change, which we are putting in as future-proofing in preparation for future potential additions to the language (namely labeling arbitrary blocks and using those labels in borrow expressions), means that code like this will start emitting warnings:

```rust
fn main() {
    { 'a: loop { break; } }
    { 'a: loop { break; } }
}
```

To make the above code compile without warnings, write this instead:

```rust
fn main() {
    { 'a: loop { break; } }
    { 'b: loop { break; } }
}
```

Since this change is only introducing a new warnings, this change is non-breaking.

Fix #21633

9 years agoDocument functional update syntax
Steve Klabnik [Tue, 21 Apr 2015 15:18:33 +0000 (11:18 -0400)]
Document functional update syntax

Fixes #24639

9 years agoimplement rfc 1054: split_whitespace() fn, deprecate words()
kwantam [Sat, 18 Apr 2015 17:49:51 +0000 (13:49 -0400)]
implement rfc 1054: split_whitespace() fn, deprecate words()

For now, words() is left in (but deprecated), and Words is a type alias for
struct SplitWhitespace.

Also cleaned up references to s.words() throughout codebase.

Closes #15628

9 years agounstabilize Words struct
kwantam [Tue, 21 Apr 2015 19:24:50 +0000 (15:24 -0400)]
unstabilize Words struct

Words struct was stabilied by mistake. Unstabilize.

9 years agoTRPL editing: tuple structs
Steve Klabnik [Tue, 21 Apr 2015 19:25:43 +0000 (15:25 -0400)]
TRPL editing: tuple structs

9 years agotest: Fix fallout in tests
Alex Crichton [Sat, 18 Apr 2015 05:12:20 +0000 (22:12 -0700)]
test: Fix fallout in tests

9 years agostd: Remove deprecated/unstable num functionality
Alex Crichton [Fri, 17 Apr 2015 22:32:42 +0000 (15:32 -0700)]
std: Remove deprecated/unstable num functionality

This commit removes all the old casting/generic traits from `std::num` that are
no longer in use by the standard library. This additionally removes the old
`strconv` module which has not seen much use in quite a long time. All generic
functionality has been supplanted with traits in the `num` crate and the
`strconv` module is supplanted with the [rust-strconv crate][rust-strconv].

[rust-strconv]: https://github.com/lifthrasiir/rust-strconv

This is a breaking change due to the removal of these deprecated crates, and the
alternative crates are listed above.

[breaking-change]