Commit Graph

41720 Commits

Author SHA1 Message Date
bors
6b29a7d564 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.
2015-04-23 02:45:06 +00:00
Young Wu
4d6e2f5334 implement set_tcp_keepalive for linux 2015-04-23 10:27:44 +08:00
bors
90cc83015e Auto merge of #24703 - Manishearth:rollup, r=Manishearth
r? @Manishearth
2015-04-22 23:25:32 +00:00
Manish Goregaokar
b0319e9094 fix doctest 2015-04-23 04:56:00 +05:30
Tamir Duberstein
4047a7c29f Remove stale comment
`ToCStr` was removed with `old_io` and the current method `as_os_str`
is inherent to `Path`, meaning there is no suitable trait bound that
could be used here.
2015-04-22 15:57:24 -07:00
Steve Klabnik
b97b0e3929 TRPL: UFCS
AKA, two four-letter acronyms 😉
2015-04-22 18:30:27 -04:00
Brian Anderson
0c196fd44c configure: Fix CDPATH bug 2015-04-22 14:52:35 -07:00
Manish Goregaokar
f81933d240 Rollup merge of #24688 - SimonSapin:fmt-write-char, r=alexcrichton
… added in #24661.
2015-04-23 03:21:02 +05:30
Manish Goregaokar
bd8101d698 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
2015-04-23 03:21:02 +05:30
Manish Goregaokar
231cb9361c Rollup merge of #24673 - steveklabnik:doc_attributes, r=alexcrichton
r? @alexcrichton
2015-04-23 03:21:02 +05:30
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