Commit Graph

41710 Commits

Author SHA1 Message Date
Brian Anderson
93b7b41137 Update rust-installer. Fixes problems with CDPATH 2015-04-22 14:49:01 -07:00
Robin Kruppe
b3a7837eab Fix a tiny typo in core::raw 2015-04-22 23:06:32 +02:00
Matt Brubeck
b4a6f895ca Explain how to create a Stdin or Stdout 2015-04-22 13:57:08 -07:00
Steve Klabnik
a9bc39c536 remove debug and display chapter
this is too small for its own thing, I think.
2015-04-22 16:41:22 -04:00
bors
5c9636975c 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
2015-04-22 18:48:31 +00:00
Alex Crichton
2e11009978 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
2015-04-22 10:42:33 -07:00
Liigo Zhuang
7a53081522 rustdoc: toggle collapse/expand all docs using the same link 2015-04-23 01:37:01 +08:00
Steve Klabnik
defdc4418a TRPL: type aliases and unsized types 2015-04-22 13:27:13 -04:00
Ulrik Sverdrup
a6f8327644 Relax bounds on Default implementation for Arc.
Send + Sync are overly restrictive, follow other traits for Arc.
2015-04-22 19:05:51 +02:00
Brian Anderson
193461c63a 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.
2015-04-22 08:51:39 -07:00
Steve Klabnik
a5ae4cc19d TRPL: attributes & conditional compilation 2015-04-22 11:27:31 -04:00
bors
3dbfa74305 Auto merge of #24692 - frewsxcv:rm-default-imports, r=alexcrichton
In 8f5b5f94dc, `default::Default` was
added to the prelude, so these imports are no longer necessary.
2015-04-22 14:41:25 +00:00
Tamir Duberstein
98f4221d49 --enable-debug adds -g. Closes #7205 2015-04-22 07:16:38 -07:00
Tamir Duberstein
0f1bfda006 Alphabetize 2015-04-22 07:16:38 -07:00
Corey Farwell
68989918d2 Remove doc-comment default::Default imports
In 8f5b5f94dc, `default::Default` was
added to the prelude, so these imports are no longer necessary.
2015-04-22 09:42:36 -04:00
bors
e9e9279d87 Auto merge of #24685 - nrc:span-pred, r=huonw 2015-04-22 08:47:09 +00:00
Simon Sapin
bf1310389e Add a test for std::fmt::Write::write_char 2015-04-22 08:52:18 +02:00
bors
50cd2e84d5 Auto merge of #24671 - steveklabnik:doc_const_static, r=alexcrichton
r? @alexcrichton
2015-04-22 06:37:57 +00:00
Nick Cameron
8456dba4e6 Fix spans for predicates in where clauses 2015-04-22 18:29:54 +12:00
bors
c0eb9384af Auto merge of #24674 - alexcrichton:rollup, r=alexcrichton 2015-04-22 03:38:20 +00:00
Steve Klabnik
a04f6c5293 TRPL: const and static 2015-04-21 19:47:07 -04:00
Alex Crichton
5815064025 Merge remote-tracking branch 'origin/master' into rollup 2015-04-21 16:27:26 -07:00
Alex Crichton
224fc1085b Test fixes and rebase conflicts, round 1 2015-04-21 16:17:24 -07:00
Alex Crichton
a1dd5ac787 rollup merge of #24636: alexcrichton/remove-deprecated
Conflicts:
	src/libcore/result.rs
2015-04-21 15:28:53 -07:00
Alex Crichton
98e9765d97 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
2015-04-21 15:28:06 -07:00
Alex Crichton
a568a7f9f2 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.
2015-04-21 15:23:54 -07:00
Alex Crichton
44338cb944 rollup merge of #24672: steveklabnik/edit_tuple_structs
I thought I edited all the last little chapters, but I missed this one.

r? @alexcrichton
2015-04-21 15:23:18 -07:00
Alex Crichton
cfbc5bebae 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"
2015-04-21 15:23:17 -07:00
Alex Crichton
0feaf6154c rollup merge of #24669: steveklabnik/fix
This section was added but the list wasn't updated.
2015-04-21 15:23:17 -07:00
Alex Crichton
83008b2e9b rollup merge of #24667: steveklabnik/more_editing
r? @alexcrichton
2015-04-21 15:23:16 -07:00
Alex Crichton
1a6c18d660 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
2015-04-21 15:23:15 -07:00
Alex Crichton
ee9d4eefba rollup merge of #24663: steveklabnik/gh24639
Fixes #24639
2015-04-21 15:23:14 -07:00
Alex Crichton
c7017b3b3e 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
2015-04-21 15:23:13 -07:00
Alex Crichton
251f8d3fbd 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.
2015-04-21 15:23:12 -07:00
Alex Crichton
59171f8ec8 rollup merge of #24651: tamird/old-references
r? @alexcrichton
2015-04-21 15:23:11 -07:00
Alex Crichton
1ec7ccb53c 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.
2015-04-21 15:23:10 -07:00
Alex Crichton
d14fb2f0d6 rollup merge of #24635: tamird/llvm-3.5
r? @alexcrichton
2015-04-21 15:23:10 -07:00
Alex Crichton
6b1ce49574 rollup merge of #24611: doomsplayer/doomsplayer-patch-1
as dependency for #24594
2015-04-21 15:23:09 -07:00
Alex Crichton
a63df9218e 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
2015-04-21 15:23:08 -07:00
Alex Crichton
37a1f2e3ac 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.
2015-04-21 15:23:07 -07:00
Alex Crichton
957cb422a9 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.
2015-04-21 15:23:06 -07:00
Alex Crichton
2fc2e12687 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
2015-04-21 15:23:06 -07:00
Alex Crichton
75f35657b3 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
2015-04-21 15:23:05 -07:00
bors
2baf348253 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
2015-04-21 21:18:30 +00:00
Steve Klabnik
f78ee1aff1 Document functional update syntax
Fixes #24639
2015-04-21 16:18:51 -04:00
kwantam
c361e13d71 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
2015-04-21 15:31:51 -04:00
kwantam
f43c86cda4 unstabilize Words struct
Words struct was stabilied by mistake. Unstabilize.
2015-04-21 15:31:45 -04:00
Steve Klabnik
b0105b5a59 TRPL editing: tuple structs 2015-04-21 15:25:43 -04:00
Alex Crichton
0791f9f406 test: Fix fallout in tests 2015-04-21 11:37:43 -07:00
Alex Crichton
eeb94886ad 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]
2015-04-21 11:37:43 -07:00